[R] Rmixmod Memory Leak

Dario Strbenac dstr7320 at uni.sydney.edu.au
Fri Aug 1 03:00:21 CEST 2014


I would like to provide a helpful bug report to the maintainer of Rmixmod, but I'm not skilled in memory profiling.

The following example illustrates the problem :

genes <- matrix(rnorm(5000*50, 9, 2), nrow = 5000, ncol = 50)
selected <- sample(5000, 25)
columns <- split(1:50, rep(1:10, each = 5))
lapply(1:100, function(index) # 100 resamples with replacement
  lapply(1:5, function(fold) # 5-fold cross validation
    apply(genes[selected, columns[[fold]]], 1, function(aGene) mixmodCluster(aGene, nbCluster = 1:3))

Even though no data was assigned to any variables, even if I do gc() after the loop, 5 GB of RAM is used. This makes the software unusable in a loop, because the server freezes when it runs out of RAM.

May someone who is an expert help me ?

Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050

More information about the R-help mailing list