Dear All,
Thanks to an answer which I received from a previous post, I'm now able to
create a series of
environments using the following:
nmes <- c("en1", "en2", "en3")
for(i in nmes) assign(i, new.env(parent = .GlobalEnv))
My next question is how, using "load", can I automatically place data into each
of these
newly created environments.
The following, and variations thereof, does not work:
nmes <- c("en1", "en2", "en3")
for(i in nmes) load(file = "/home/testData/Data.RData", i)
I've tried, among other attempts, to use "as.environment(i)" without success.
My "i" is seen
as a character, but I want it to be seen as the environment which it
represents.
Kind regards,
J.Powell
LEI
Visserij
Alexanderveld 5
2585 DB Den Haag
The Netherlands
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.