rasterTmpDir
. It is the same as that of the R temp directory but you can change it (for the current session) with rasterOptions(tmpdir="path")
.
To permanently set any of these options, you can add them to /etc/Rprofile.site>
. For example, to change the default directory used to save temporary files, add a line like this: options(rasterTmpDir='c:/temp/')
to that file. All temporary raster files in that folder that are older than 24 hrs are deleted when the raster package is loaded.
Function tmpDir
returns the location of the temporary filesrasterOptions(format, overwrite, datatype, tmpdir, tmptime, progress,
timer, chunksize, maxmemory, todisk, setfileext, tolerance,
standardnames, depracatedwarnings, addheader, default=FALSE)
tmpDir(create=TRUE)
writeFormats
TRUE
, existing files will be overwrittenrasterTmpFile
TRUE
, the time it took to complete the function is printedcanProcessInMemory
will return FALSE
FALSE
and should normally not be changed. If TRUE
, results are always written to disk, even if no filename is supplied (a temporary filename is used)TRUE
. If TRUE
, the file extension will be changed when writing (if known for the file type). E.g. GTiff files will be saved with the .tif extensionTRUE
. Should names
be standardized to be syntactically valid names (using make.names
)TRUE
(the default) a warning is generated when a depracated (obsolete) function is used''
(the default) an additional header file is written when a raster format file (grd/gri) is written. Supported formats are as in hdr
TRUE
, all options are set to their default valuesTRUE
, the temporary files directory is created if it does not existoptions
, rasterTmpFile
rasterOptions()
rasterOptions(chunksize=2e+07)
Run the code above in your browser using DataLab