I\'ve been figuring this out for a couple of hours now. Let\'s say I have a column with 1-4 words, separated by space:
aba bkak absbs a2aj akls bios sad fasa
Try
library(splitstackshape) cSplit(df1, 'V1', ' ')
Or
library(tidyr) separate(df1, 'V1', paste0('V', 1:4), sep= ' ', extra='drop')
Or using base R
base R
read.table(text=df1$V1, sep=' ', fill=TRUE)
NOTE: Used the column name as 'V1' and dataset as 'df1'