Re: [R] unlist & dataframes

2008-11-06 Thread Henrique Dallazuanna
Try this: unlist(lapply(l, t)) On Thu, Nov 6, 2008 at 9:05 AM, Naira <[EMAIL PROTECTED]> wrote: > > I have forgotten to say that the elements in the list are not necessarily > equal... meaning that x1 and x2 are from different dimensions so I can't > use > data.frame(l) > > More suitable exampl

Re: [R] unlist & dataframes

2008-11-06 Thread Naira
Thanks a lot :) It is doing exactly what I want Naira David Freedman wrote: > > try > > newdata=do.call(rbind,l) > > David Freedman, Atlanta > > > > > Naira wrote: >> >> Dear all, >> >> I would like to know whether it is possible to unlist elements and keep >> the original format of

[R] unlist & dataframes

2008-11-06 Thread Naira
Dear all, I would like to know whether it is possible to unlist elements and keep the original format of the data. To make it more clear, let me give an exemple: I have a list l of dataframes that I created with apply but which looks like this: x1=data.frame(Name=LETTERS[1:2],Age=1:2) x2=data.fr

Re: [R] unlist & dataframes

2008-11-06 Thread Naira
I have forgotten to say that the elements in the list are not necessarily equal... meaning that x1 and x2 are from different dimensions so I can't use data.frame(l) More suitable example: x1=data.frame(Name=LETTERS[1:2],Age=1:2) x2=data.frame(Name=LETTERS[3:5],Age=3:5) l=list(x1,x2) l l [[1]]

Re: [R] unlist & dataframes

2008-11-06 Thread David Freedman
try newdata=do.call(rbind,l) David Freedman, Atlanta Naira wrote: > > Dear all, > > I would like to know whether it is possible to unlist elements and keep > the original format of the data. > To make it more clear, let me give an exemple: > I have a list l of dataframes that I created wit