Separate to Columns is missing split by fixed position

There seems to be missing functionality in the Desktop tool based on the capabilities of dplyr’s separate function. It would be nice if the tool also supported the ability to input a separator with fixed positions. For example, suppose I have the following data frame:

df <- data.frame(serial_no = c(“X77056650123171000100”, “X77056650123171000099”, “X77056650123171000040”))

If I use the “Separate” function in Exploratory, and try to provide a custom separator c(9,14), then it creates the following command:

  • df %>% separate(serial_no, into = c(“sub_code_1”, “sub_code_2”, “sub_code_3”), sep = “c(9,14)”, remove = FALSE)

with quotes around the c(9,14). The expected functionality is to allow the field to be unquoted so it can provide a split at the fixed positions which would end up looking like this:

df %>% separate(serial_no, into = c(“sub_code_1”, “sub_code_2”, “sub_code_3”), sep = c(9,14), remove = FALSE)
serial_no sub_code_1 sub_code_2 sub_code_3
1 X770566501231710001001 X77056650 12317 10001001
2 X770566501231710000991 X77056650 12317 10000991
3 X770566501231710000401 X77056650 12317 10000401

Yes, we don’t support that with our UI yet. However, you can type the command directly.

We’ll consider add this in the future releases, thanks for pointing this out!