Re: [R] expand.grid() function

2008-06-23 Thread Wacek Kusnierczyk
Ken Knoblauch wrote: > > How about > > do.call("expand.grid", rep(list(c("u", "l")), 3)) > Var1 Var2 Var3 > 1uuu > 2luu > 3ulu > 4llu > 5uul > 6lul > 7ull > 8lll > > ... which can now be nicely gen

Re: [R] expand.grid() function

2008-06-23 Thread Gavin Simpson
desire for an answer does not > ensure that a reasonable answer can be extracted from a given body of > data. > ~ John Tukey > > -Oorspronkelijk bericht- > Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Namens Gavin Simpson > Verzonden: maandag 23 juni 2008 15:51

Re: [R] expand.grid() function

2008-06-23 Thread ONKELINX, Thierry
D] Namens Gavin Simpson Verzonden: maandag 23 juni 2008 15:51 Aan: Megh Dal CC: [EMAIL PROTECTED] Onderwerp: Re: [R] expand.grid() function On Mon, 2008-06-23 at 06:16 -0700, Megh Dal wrote: > Hi, > > I have one question on expand.grid() function. > > When I write following

Re: [R] expand.grid() function

2008-06-23 Thread Ken Knoblauch
Megh Dal yahoo.com> writes: > I have one question on expand.grid() function. > When I write following syntax :expand.grid(c("u", "l"), >c("u", "l"), c("u", "l")) I get following as > desired : > Var1 Var2 Var3 > 1uuu > 2luu > 3ulu > 4llu > 5

Re: [R] expand.grid() function

2008-06-23 Thread Gavin Simpson
On Mon, 2008-06-23 at 06:16 -0700, Megh Dal wrote: > Hi, > > I have one question on expand.grid() function. > > When I write following syntax :expand.grid(c("u", "l"), c("u", "l"), > c("u", "l")) I get following as desired : > Var1 Var2 Var3 > 1uuu > 2luu > 3

Re: [R] expand.grid function

2007-12-25 Thread Satoshi Takahama
Hi Derek, I love this function as well. If 'mat' is your matrix, > (mat <- matrix(1:15,ncol=3)) [,1] [,2] [,3] [1,]16 11 [2,]27 12 [3,]38 13 [4,]49 14 [5,]5 10 15 how about > expandedDF <- do.call(`expand.grid`,as.data.frame(mat)) > head(expand

Re: [R] expand.grid function

2007-12-23 Thread dxc13
Yes, that works perfectly. Thank you for your help! Derek Charilaos Skiadas-3 wrote: > > Hi Derek, > On Dec 23, 2007, at 10:59 PM, dxc13 wrote: > >> >> useR's, >> >> I have used expand.grid() several times and like the results it >> gives me. I >> am now trying something with it that I h

Re: [R] expand.grid function

2007-12-23 Thread Charilaos Skiadas
Hi Derek, On Dec 23, 2007, at 10:59 PM, dxc13 wrote: > > useR's, > > I have used expand.grid() several times and like the results it > gives me. I > am now trying something with it that I have not been able to get to > work. > For any n column matrix I would like to run this function on those