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