Re: [R] Data frame with 0 rows. (Thanks.)

2008-02-20 Thread Rolf Turner
Thanks to Bill Venables, Gabor Grothendieck, and Tony Plate all of whom gave me useful advice in answer to my question: >> For reasons best known only to myself ( :-) ) I wish to create a data >> frame with 0 rows and 9 columns. >> The best I've been able to come up with is: >> junk <- as.da

Re: [R] Data frame with 0 rows.

2008-02-20 Thread Tony Plate
Rolf Turner wrote: > For reasons best known only to myself ( :-) ) I wish to create a data > frame with 0 rows and 9 columns. > > The best I've been able to come up with is: > > junk <- as.data.frame(matrix(0,nrow=0,ncol=9)) > > Is there a sexier way? I'm unsure of their virtue or seedine

Re: [R] Data frame with 0 rows.

2008-02-19 Thread Gabor Grothendieck
Check out this thread: https://stat.ethz.ch/pipermail/r-help/2008-February/153638.html On Feb 19, 2008 10:47 PM, Rolf Turner <[EMAIL PROTECTED]> wrote: > > For reasons best known only to myself ( :-) ) I wish to create a data > frame with 0 rows and 9 columns. > > The best I've been able to come

[R] Data frame with 0 rows.

2008-02-19 Thread Rolf Turner
For reasons best known only to myself ( :-) ) I wish to create a data frame with 0 rows and 9 columns. The best I've been able to come up with is: junk <- as.data.frame(matrix(0,nrow=0,ncol=9)) Is there a sexier way? cheers, Rolf ##