The problem is very simple, but I'm having no luck fixing it. strsplit() is a fairly simple function, and I am surprised I am struggling as much as I am:
# temp is the problem string. temp is copy / pasted from my R code.
# i am hoping the third character, the space, which i think is the error, remains the error
temp = "GS PG"
# temp2 is created in stackoverflow, using an actual space
temp2 = "GS PG"
unlist(strsplit(temp, split = " "))
 "GS PG"
unlist(strsplit(temp2, split = " "))
 "GS" "PG"
Try the following:
"\\s+" is a regex search for any type of whitespace instead of just a standard space.