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

2008-07-24 Thread Henrique Dallazuanna
t; > [2,] "1" "2" [3,] "1" "2" "4" "5" > > I tried to use do.call(rbind, strings) but failed due to unequal row lengths. > > Date: Thu, 24 Jul 2008 09:35:21 +0100> From: [EMAIL PROTECTED]> To: [EMAIL > > PROTECTED]&

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

2008-07-24 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Daren Tan wrote: > >> I want the matrix to look like this: >> >> [,1] [,2] [,3] [,4] >> [1,] "1" "2" "3" >> [2,] "1" "2" [3,] "1" "2" "4" "5" >> >> I tried to use do.call(rbind, strings) but failed due to unequal row lengths. >> >> > you can't {r,c}bi

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

2008-07-24 Thread Wacek Kusnierczyk
Daren Tan wrote: > I want the matrix to look like this: > > [,1] [,2] [,3] [,4] > [1,] "1" "2" "3" > [2,] "1" "2" [3,] "1" "2" "4" "5" > > I tried to use do.call(rbind, strings) but failed due to unequal row lengths. > you can't {r,c}bind them because of different lengths. one way to r

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

2008-07-24 Thread Daren Tan
Date: Thu, 24 Jul 2008 09:35:21 +0100> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> CC: [EMAIL PROTECTED]> Subject: Re: [R] convert a vector of words > into a matrix> > And what should the matrix look like?> > > Patrick Burns> > [EMAIL PROTECTED]> +44

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

2008-07-24 Thread Patrick Burns
And what should the matrix look like? Patrick Burns [EMAIL PROTECTED] +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]

[R] convert a vector of words into a matrix

2008-07-23 Thread Daren Tan
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. [[al