search for: tmphet

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

Did you mean: tmp_t
2009 May 14
3
memory usage grows too fast
...y code is quite simple as the following to find the pattern ?02?. OccurrenceRate_Fun<-function(dataMatrix) { tmp<-NULL tmpMatrix<-apply(dataMatrix,1,match,"02") for ( i in 1: ncol(tmpMatrix)) { tmpRate<-table(tmpMatrix[,i])[[1]]/ nrow(tmpMatrix) tmp<-c(tmp,tmpHET) } rm(tmpMatrix) rm(tmpRate) return(tmp) gc() } The problem is the memory usage grows very fast and hard to be handled on machines with less RAM. Could anyone please give me some comments on how to reduce the space complexity in this calculation? Thanks, Mike