Re: [R] List extraction

From: Pete Brecknock <Peter.Brecknock_at_bp.com>
Date: Mon, 28 Mar 2011 19:34:58 -0700 (PDT)

Doesn't use apply but maybe the following will work for you?

temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04)) temp2<- data.frame(ID=c("Herb","Shrub",
"Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3))
L<-list(a=temp1,b=temp2)

d.f = do.call("rbind",L)
d.f$tableName = substring(rownames(x),1,1)

HTH Pete

--
View this message in context: http://r.789695.n4.nabble.com/List-extraction-tp3413374p3413564.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 29 Mar 2011 - 02:37:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Mar 2011 - 03:00:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive