search for: dellist

Displaying 1 result from an estimated 1 matches for "dellist".

2009 Dec 17
2
issue with using rm: cannot generate on-the-fly list
...op is global. Within this loop I generate several variables which should be removed at the end of each iteration. To do this, I wrote a function to clean up the workspace. An example is included here: cleanUpWorkspace<-function() { #Remove key data sructures, if they have been declared: delList<-list() for(varname in c("rv1","rv2", "rv3", "rv4")) { if(exists(varname)) { delList<-append(delList, varname) } } if(length(delList)>0) { rm(list=delList, pos=-1) #rm(list=delList, envir=parent...