Hello everyone,

I have the following issue: one function generates a very big array (can be
more than 1 Gb) and returns a few variables, including this big one. Memory
allocation is OK while the function is running, but the final steps make
some copies that can be problematic. I looked for a way to return the values
without copying (even tried Rmemprof), but without success. Any ideas?
The code looks like this:

myfunc <- function() {
...
bigarray <- ...
...
final <- list(..., bigarray=bigarray, ...)
class(final) <- "myfunc"
final
}

Thank you in advance,
Gabriel.

        [[alternative HTML version deleted]]

______________________________________________
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