Displaying 1 result from an estimated 1 matches for "innerfun".
2009 Nov 03
1
likely bug in 'serialize' or please explain the memory usage
...fun) {
FUN = serialize(fun, NULL)
DAT = serialize(x, NULL)
cat(sprintf("length FUN=%d; length DAT=%d\n", length(FUN),
length(DAT)))
invisible(NULL) ## return results of a call on a remote host with
FUN and DAN
}
## the function variant I will be passing into mycall
innerfun = function(z) z
x = runif(1e6)
## test run from the command line
mycall(x, innerfun)
# output: length FUN=106; length DAT=8000022
## test run from within a function
outerfun1 = function(x) mycall(x, innerfun)
outerfun1(x)
# output: length FUN=106; length DAT=8000022
## test run from within a fun...