Roger-123 Roger-123 - 5 months ago 25
R Question

how to adjust in R?

Can anyone help me figure out how to change the max size of global objects passed to an item in the future package?

Here's a useless example that shows my point

a = 1:200000000
test %<-% head(a)

I get the following error:

Error in getGlobalsAndPackages(expr, envir = envir, persistent = persistent, : The total size of all global objects that need to be exported for the future expression (‘head(a)’) is 762.95 MiB. This exceeds the maximum allowed size of 500.00 MiB (option ''). There are two globals: ‘a’ (762.94 MiB of class ‘numeric’) and ‘head’ (10.05 KiB of class ‘function’).

Can anyone help me understand how to adjust that option? I tried
options ( = 1500000)
but that didn't work.


Got it figured out and learned how you can edit options for any package.

This is the line that I used:

options(future.globals.maxSize= 891289600)

If you want to customize your limit, I saw in the package source that the limit was calculated and this is how you would calculate the size for an 850mb limit:

850*1024^2 = 891289600