Re: [R] Convert some columns of List to dataframe R

2014-08-04 Thread Zilefac Elvis
Great! Thanks, John. For the eye sees not itself, but by reflection and someother things On Sunday, August 3, 2014 4:54 PM, John McKown wrote: On Sun, Aug 3, 2014 at 5:12 PM, Zilefac Elvis wrote: > Dear All, > I have a List in R and would like to convert it to data.frame. > Below is a reprod

Re: [R] Convert some columns of List to dataframe R

2014-08-03 Thread Zilefac Elvis
Hi John, Thanks. As you said, I want the "Site" values to become individual variable names whose value is in the "x" column: Output should look exactly like: Year G101 G102 2001 33.1 34 Thanks, Atem. On Sunday, August 3, 2014 4:48 PM, John McKown wrote: On Sun, Aug 3, 2014 at 5:43 PM, J

Re: [R] Convert some columns of List to dataframe R

2014-08-03 Thread John McKown
On Sun, Aug 3, 2014 at 5:12 PM, Zilefac Elvis wrote: > Dear All, > I have a List in R and would like to convert it to data.frame. > Below is a reproducible example. I can do something like: > > x1<-do.call(cbind.data.frame, lst3) #OR > x1<-as.data.frame(lst3). > > However, my output looks like thi

[R] Convert some columns of List to dataframe R

2014-08-03 Thread Zilefac Elvis
Dear All, I have a List in R and would like to convert it to data.frame. Below is a reproducible example. I can do something like:  x1<-do.call(cbind.data.frame, lst3) #OR x1<-as.data.frame(lst3). However, my output looks like this: Year Site  x   Year Site x 2001 G101 33.1 2001 G102 34 I wo