# NOT RUN {
test_df <- data.table(x = c("a", "a.b", "a.b", NA))
# "sep" can be automatically detected (slower)
test_df %>%
separate.(x, into = c("c1", "c2"))
# Faster if "sep" is provided
test_df %>%
separate.(x, into = c("c1", "c2"), sep = ".")
# }
Run the code above in your browser using DataLab