I'm working on a function for raster package. In the end of the function I have to use
stack() to create a
RasterStack. When I do this the data source is in memory. I want to have the data source on a file.
For example if I use crop() I can do:
asd <- crop(raster, extent, filename="something.tif") inMemory(asd) TRUE
I can't do the same with stack(), but I need to have the results on files, because it writes all files on RasterTmpFiles and I end having memory problems.