Interpretation of memory profiling output of `Rprof`
I am trying use profiling to see which part of my code is reposponsible for the maximum usage of 3GB of memory (as reported by gc() statistic on maximum used memory, see here how ). I am running memory profiling like this: Rprof(line.profiling = TRUE, memory.profiling = TRUE) graf(...) # ... here I run the profiled code Rprof(NULL) summaryRprof(lines = "both", memory = "both") And the output is the following: $by.total total.time total.pct mem.total self.time self.pct "graf" 299.12 99.69 50814.4 0.02 0.01 #2 299.12 99.69 50814.4 0.00 0.00 "graf.fit.laplace" 299.06 99.67 50787.2 0.00 0.00