Folks,
  I have some computations in a function that create some large matrices.

I have been in the habit in these circumstances to call "null out" a matrix 
once used and call gc().

Some pseudo code:

theFunction<-function(x, y, z, 100000000) {
   myMatrix  <- black.box.function(x, y, z, 100000000)
   interesting.data<-myFunc(myMatrix)
   myMatrix<-NULL
   gc()
   ....
   interesting.data/pi
}

Would it be different if I chose to replace myMatrix<-NULL with rm(myMatrix)?

The gc docs are fine but I was wondering if there were any other tips or links 
on the subject.

Thanks for your time,
KW

--

______________________________________________
R-help@r-project.org 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.

Reply via email to