tidyverse / tidyr

Tidy Messy Data
https://tidyr.tidyverse.org/
Other
1.38k stars 418 forks source link

separate_wider_delim changes input column names when using names_sep with cols_remove=FALSE #1539

Open markpurver opened 7 months ago

markpurver commented 7 months ago

The separate_wider_delim function changes the input column names from cols to strrep(cols, 2) when you use names_sep with cols_remove=FALSE, e.g. column "a" becomes column "aa".

separate_wider_delim(tibble(a="x y"), cols=a, delim=" ", names_sep="", cols_remove=FALSE)
sda030 commented 2 months ago

Duplicate of https://github.com/tidyverse/tidyr/issues/1499