Re: [R] convert a vector of words into a matrix

From: Patrick Burns <pburns_at_pburns.seanet.com>
Date: Thu, 24 Jul 2008 09:35:21 +0100

And what should the matrix look like?

Patrick Burns
patrick_at_burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

Daren Tan wrote:
> 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.
>
>
>



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 - 08:37:55 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