if you do below, then d[[1]] is the first, d[[2]] is the second etc.

d <- lapply(1:50,function(.index) {
       data.frame(x=factor(),y=numeric())
     })

print(d)
print(str(d))


On Fri, Oct 24, 2008 at  4:36 AM, tedzzx wrote:

Dear R users,

I want to creat a group of data frames, such as:
d1<-data.frame(x=factor(),y=numeric(),...)
d2<-data.frame(x=factor(),y=numeric(),...)
d3<-data.frame(x=factor(),y=numeric(),...)
:
:
d50<-data.frame(x=factor(),y=numeric())

How can I use the loop to simply my procedure?
Thanks advance

Ted
--
View this message in context: http://www.nabble.com/how-to-simply-the-procedure-of-creating-a-group-of-data.frame--tp20146344p20146344.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

______________________________________________
R-help@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.

Reply via email to