Skip to content
Prev 131749 / 398502 Next

Reading through a group of .RData files

note that load() returns, invisibly, a string with the names of the 
objects that were loaded. something in the lines of:

myObj <- load(file.path(fnDir, cvListFiles[i]))
myFunction(get(myObj))
rm(list=myObj)

might be closer to what you want.

moreover, if length(myObj) > 1, you might want sth like:

lapply(myObj, function(x) myFunction(get(x)))

instead...

best
b
On Mon, 10 Dec 2007, Talbot Katz wrote: