Re: [R] problems creating data frames

2008-03-15 Thread John Kane
Another approach might be to start with a list, pad the vectors and then convert to a data.frame. Here is something that Henrique Dallazuanna and Phil Spector suggested to me a couple of days ago as a way of solving something of a similar problem. It seems to have the advantage that it will hand

Re: [R] problems creating data frames

2008-03-14 Thread Gabor Grothendieck
This was just discussed this week: https://stat.ethz.ch/pipermail/r-help/2008-March/157082.html On Fri, Mar 14, 2008 at 5:01 PM, Will Holcomb <[EMAIL PROTECTED]> wrote: > I am having two problems creating data frames that I have solutions, but > they really seem like kludges and I assume I just d

Re: [R] problems creating data frames

2008-03-14 Thread jim holtman
This should do what you want for the data.frame: > x <- list(Behavior_Therapy = c(6, 7, 6, 5, 5, 5, 7, 8, 9, 6, 6, 7), + Atenolol = c(4, 8, 10, 3, 6, 5, 6, 3, 7, 5, 4, 6), + Placebo = c(0, 7, 0, 7, 0, 7)) > # find the longest vector and make all th