Is it possible to monitor the amount of memory that is in use or has been used by R to call a function? For example, I have an arbitrary function, e.g:
small
One option is to use Rprof. A simple approach is this:
Rprof
Rprof(tf <- "rprof.log", memory.profiling=TRUE) [your code] Rprof(NULL) summaryRprof(tf)
This will give you some information on memory usage.