Apologies for bringing up an old topic, but I am not finding working answers. I am also an R newbie, so I'm still on the steep part of the learning curve.
I have a character string : "0.5 1 2 3 4" I need to convert it to a vector of numbers. I get as far as strsplit(), which gives me "0.5" "1" "2" "3" "4" this is still treated by R as a single item. I need to get it to look like this: "0.5", "1", "2", "3", "4" so that I can use as.numeric() and make it into a vector of numbers... I have been going mad because for text operations, commas and quotes are loaded with meaning, and I keep going around in circles. Any help would be appreciated Thanks Paul -- View this message in context: http://r.789695.n4.nabble.com/Converting-charter-string-to-vector-of-numbers-tp4705097.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.