Hello, Try this, It'll maybe help you:
a <- "1,2" b <- strsplit(a,",") #split your data according to "," b <- unlist(b) # it creates a list, so we unlist the result to obtain a vector like c(1,2) -- View this message in context: http://r.789695.n4.nabble.com/converting-a-string-to-an-integer-vector-tp4646610p4646619.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [email protected] mailing list 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.

