You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noted a very large memory overhead in the simulate.res.S helper function.
The function calls: many.obj = list(obj)[rep(1, n.res)]
This create many lists of the same stackedsdm object.
Unfortunately the LM and GLM models have quite a large memory foot print - and so if you working with 1000's of samples and 1000's of species then memory requirements become enormous in this step you in effect multiple the memory usage by the number of simulations.
I propose you run the following instead: res = lapply(1:n.res,function(x) residuals(obj))
This achieves the desired outcome to produce the residuals but without the unnecessary memory usage.
Cheers,
Chris
The text was updated successfully, but these errors were encountered:
Hey guys
I noted a very large memory overhead in the simulate.res.S helper function.
The function calls:
many.obj = list(obj)[rep(1, n.res)]
This create many lists of the same stackedsdm object.
Unfortunately the LM and GLM models have quite a large memory foot print - and so if you working with 1000's of samples and 1000's of species then memory requirements become enormous in this step you in effect multiple the memory usage by the number of simulations.
I propose you run the following instead:
res = lapply(1:n.res,function(x) residuals(obj))
This achieves the desired outcome to produce the residuals but without the unnecessary memory usage.
Cheers,
Chris
The text was updated successfully, but these errors were encountered: