Hello,

I would like to save the results in a specified file name.  Here is a test 
example:
 

aa <- function(xx, newname) {
 yy <- xx^2
    rdName <- file.path(paste(newname, ".RData", sep = ""))
    assign(eval(newname), yy)
save(newname, file=rdName) ## FIXME
}


aa(3, "test")

load("test.RData")
ls() 

I would like to see test (which should store 9) rather than newname (which 
stores "test")

Please let me know how to do this.

Thanks.
-Nitin



      
_________________________________________________________________________________
stings, and more!
http://tv.yahoo.com/collections/3658

______________________________________________
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