- edited description
Line 141 in fmask.R:
r <- mask(r, n.ms, maskvalue = 0)
does not write to tmpdir even if rasterOptions(tmpdir = outdir) is called before running fmask() and most temporary rasters are effectively written to outdir. Looks like a bug in raster::mask.
Tried: r <- mask(r, n.ms, maskvalue = 0, filename = rasterTmpFile())
Didn't work. Still writing to C:\Users...\ (which is not the working directory) and filling up memory, which results in a crash of the function.