I\'d like to know how to split columns in a similar way that excel does in the \"text-to-column\" feature. There are many tutorials on stackexchange about how to split colum
Splitting with strsplit and then accessing with "[" seems to work. You do realize those were factors to begin with I hope?
spl <-strsplit(as.character(df$V1), ",")
data.frame(V1= sapply(spl, "[", 1), V2 = sapply(spl, "[", 2), df$V2)
V1 V2 df.V2
1 01 02 11, 12
2 04 14
3 05 06 13, 14
4 07 08 11, 14
5 09 13
6 10 15