Skip to content
Prev 177213 / 398506 Next

Looping through file names and loading...

greggallen at gmail.com wrote:
Calling load(s) here will load the objects from a saved image into the 
local evaluation frame of your function.  They could overwrite i, or s, 
or filename, or any other local variables.  Are you sure that's what you 
want to do?  I think it would be safer to do something like

e <- new.env()
load(s, e)

and then you've loaded things into e, not into your evaluation frame, 
and they shouldn't mess you up.  It makes it a bit more work to extract 
things, but not that much more.
Now this doesn't make sense:  isn't "s" a filename? 

Duncan Murdoch