So I have the data.frame
dat = data.frame(x = c(\'Sir Lancelot the Brave\', \'King Arthur\', \'The Black Knight\', \'The Rabbit\'), stri
Here is a nice and simple approach with tidyr.
tidyr
library(tidyr) ncol <- max(sapply(dat, length)) dat %>% separate(x, paste0("V", seq(1,ncol)))
Note: You will get a warning, however, it is basically telling you that separate is padding the data with NA's. So you can ignore the warning.
separate
NA