Take a look at "do.call".
In your case, 'do.call("cbind", cc)' should work.
Hope this helps,
Matt Wiener
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Rideau Cruz
Sent: Friday, August 27, 2004 9:12 AM
To: [EMAIL PROTECTED]
Subject: [R] for (i in ...) { df[[i]]<- .....}
R-help,
In the following loop :
for(i in 1:8)
{
cc[[i]]<-tapply(test[,i+6],list(puntar=test$puntar),sum)/tapply(test[,5],lis
t(puntar=test$puntar),sum)
cbind.data.frame(cc[[1]],cc[[2]],cc[[3]],cc[[4]],
cc[[5]],c[[6]],cc[[7]],cc[[8]])
}
Is there anyway I can 'cbind.data.frame' the objects cc[[ i ]] without
actually writing every single element??
In this case there are 8 but what if it is a large number??
Thank you
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html