Sean,
fun.CROP_AGWBC refers to objects that are not defined inside the
function (lm.final and lambda_DV). I assume that this is
intentional and that these represent constants; and that they are
available in your global environment. If so, you need to export these
objects to the cluster nodes.
Hi Robert,
That did the trick! I didn’t realize you need to put the original function in
the ‘export=‘ argument. The following code now works:
brick - brick(BC_BA, BC_BA_SE, SlopePer) ## Stack three rasters into one
RasterBrick
testbrick - crop(brick, extent(299700, 300100, 1553550,
Hi
I am attempting to explore the scale of spatial autocorrelation in a raster
(eventually across a stack of 10 but for now a single layer) and consequently
in a potential sample of points across the landscape (ie. if we wanted to know
what sampling design in terms of distance would minimize
Hi Robert,
Thanks for the advice. So I tried exporting the objects defined in the
function (lm.final and lambda_DV) with the following code:
library(raster)
library(rgdal)
library(mc2d)
brick - brick(BC_BA, BC_BA_SE, SlopePer) ## Stack three rasters into one
RasterBrick
testbrick -
The below works for me. You used function 'f' to clusterR, where it
should have been 'calc'
library(raster)
library(snow)
library(mc2d)
f - function(x) {
dBC_BA - mcdata(x[1], type=0)
dBC_BA_SE - mcdata(x[2], type = 0)
SlopePer -x[3]
stBA - mcstoc(rnorm, type = U, rtrunc = TRUE, mean =