> I'm not sure what the other lines(but the last) have to do anything, but are > you looking for something like this: > > do.call(rbind, sapply(paste(1:10, 1:10), strsplit, split=' '))
strsplit is already vectorised wrt its first argument, so all you need is: do.call(rbind, strsplit(paste(1:10, 1:10), split=' ')) Alternatively, you can use str_split_fixed from the stringr package: library(stringr) str_split_fixed(paste(1:10, 1:10), " ", 2) Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org 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.