Split Character Vector by Lengths
Examples
random_hcpcs(5) |>
split_lengths() |>
remove_redundant() |>
split_first()
#> $x1
#> [1] "0" "1" "B" "T"
#>
#> $x2
#> $x2[[1]]
#> [1] "47"
#>
#> $x2[[2]]
#> [1] "61"
#>
#> $x2[[3]]
#> [1] "C9"
#>
#> $x2[[4]]
#> [1] "M1"
#>
#>
#> $x3
#> $x3[[1]]
#> [1] "334"
#>
#> $x3[[2]]
#> [1] "542"
#>
#> $x3[[3]]
#> [1] "946"
#>
#> $x3[[4]]
#> [1] "G88"
#>
#> $x3[[5]]
#> [1] "Q42"
#>
#>
#> $x4
#> $x4[[1]]
#> [1] "3266"
#>
#> $x4[[2]]
#> [1] "7841"
#>
#> $x4[[3]]
#> [1] "9258"
#>
#>
#> $x5
#> $x5[[1]]
#> [1] "50825"
#>
#> $x5[[2]]
#> [1] "81407"
#>
#> $x5[[3]]
#> [1] "96573"
#>
#> $x5[[4]]
#> [1] "A9155"
#>
#> $x5[[5]]
#> [1] "D6999"
#>
#>