powered by
extract()
extract(data, col, into, regex = "([[:alnum:]]+)", remove = TRUE, convert = FALSE, ...)
TRUE
type.convert
as.is = TRUE
regexec
library(dplyr) df <- data.frame(x = c("a.b", "a.d", "b.c")) df %>% extract(x, "A") df %>% extract(x, c("A", "B"), "([[:alnum:]]+)\\.([[:alnum:]]+)")
Run the code above in your browser using DataLab