[R] convert a vector of words into a matrix

From: Daren Tan <daren76_at_hotmail.com>
Date: Thu, 24 Jul 2008 06:23:51 +0000

How to convert the strings into matrix ?  

(strings <- strsplit(c("1 2 3", "1 2", "1 3 4 5"), " "))[[1]][1] "1" "2" "3"
[[2]][1] "1" "2"
[[3]][1] "1" "3" "4" "5"
 



Easily edit your photos like a pro with Photo Gallery.

        [[alternative HTML version deleted]]



R-help_at_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. Received on Thu 24 Jul 2008 - 06:29:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 09:32:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive