Displaying 1 result from an estimated 1 matches for "testloadseveralhdf".
2001 Apr 10
2
clear R-objects inside a function?
...2, R-hdf5-1.2 library,
I want to load a dataset, do some stuff with it, then erase its objects,
get an other, repeat. My friend wrote a function which tried to clear
away all the objects. At the end, it uses rm() to remove objects. This
is the same way we do it interactively, from the R prompt:
testLoadSeveralHDF <- function(numFiles) {
for (i in 0:(numFiles-1)) {
filename <- paste("trial",i,".hdf",sep="")
print(filename)
hdf5load(filename)
rm(list = ls(pat="g*"))
}
}
However, after that program runs, the g* objects are not erased, but
ty...