I'm trying to split a column in a dataset based on a " "
rather than a ","
or some other delimiter. Is this possible?
so for example I have:
VVV <- strsplit(df$col, " ")
however I get the error: Error in strsplit(df$col, " ") : non-character argument
I'd like to separate based on the space right before the new set of characters begin. It doesn't help that a few rows have 2 spaces.
aaaa bbbb
aaa bbbb
caaa hhh
What should I do instead?