Open
Description
Hi ,this is my example, i think it may be wrong.
when i set names_sep = "_"
and cols_remove = FALSE
,the x
column become x_x
.
df4 <- tibble(x = c("202215TX", "202122LACC", "202325"))
df4 |>
separate_wider_position(
x,
widths = c(year = 4, age = 2, state = 2),
names_sep = "_",
too_few = "align_start",
too_many = "drop",
cols_remove = FALSE
)
A tibble: 3 × 4
x_year x_age x_state x_x
1 2022 15 TX 202215TX
2 2021 22 LA 202122LACC
3 2023 25 NA 202325
Metadata
Metadata
Assignees
Labels
No labels