Hello,
I am trying to create a data frame with a unique name, based on indexing
of for loop. I was wondering if there is a way to do this, I keep
running into errors when I try to do this. Below is a brief example, I
am trying to get two data frames (name1 and name2).
Any suggestions are appreciated.
Thanks,
Doug
# Example
for (i in 1:2) {
x=c(1,2,3,4)
y=c(10,20,30,40)
G <- paste("name", i, sep="")
G[i] <- data.frame(x,y)
}
--
---------------------------------
Douglas M. Hultstrand, MS
Senior Hydrometeorologist
Metstat, Inc. Windsor, Colorado
voice: 720.771.5840
email: dmhul...@metstat.com
web: http://www.metstat.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.