Hi there,
When I run the following code, I could get correct objects (with correct
values):
for(i in 1:6) { #-- Create objects 'r.1', 'r.2', ... 'r.6' --
nam <- paste("r",i, sep=".")
assign(nam, 1:i)
# save(nam, file = paste(nam, "RData", sep = "."))
}
I hope to save the object 'r.1', 'r.2', ..., 'r.6' using the above
commented line, however, I just got 'r.1.RData' with a object 'nam' in
it, which had the value, e.g., 'r.6', not the value of 'r.6', i.e., 1:6.
Any suggestions? Thanks in advance.
Jinsong
______________________________________________
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.