Re: [R] data frame with nested data frame

2010-12-23 Thread Gabor Grothendieck
On Thu, Dec 23, 2010 at 5:06 PM, Vadim Ogranovich wrote: > Dear R-users, > > I am somewhat puzzled by how R treats data frames with nested data frames. > Below are a couple of examples, maybe someone could help explain what the > guiding logic here is. > > ## construct plain data frame >> z <- d

Re: [R] data frame with nested data frame

2010-12-23 Thread David Winsemius
On Dec 23, 2010, at 5:06 PM, Vadim Ogranovich wrote: Dear R-users, I am somewhat puzzled by how R treats data frames with nested data frames. Speaking as a fellow user, why? Why would we want dataframes inside dataframes? Why wouldn't lists of dataframes be more appropriate if you

[R] data frame with nested data frame

2010-12-23 Thread Vadim Ogranovich
Dear R-users, I am somewhat puzzled by how R treats data frames with nested data frames. Below are a couple of examples, maybe someone could help explain what the guiding logic here is. ## construct plain data frame > z <- data.frame(x=1) ## add a data frame member > z$y <- data.frame(a=1,b=2)