Global options for the raster package
Set, inspect, reset, save a number of global options used by the raster package.
Most of these options are used when writing files to disk. They can be ignored by specific functions if the corresponding argument is provided as an argument to these functions.
The default location is returned by 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 <your R installation>/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 files
rasterOptions(format, overwrite, datatype, tmpdir, tmptime, progress, timer, chunksize, maxmemory, memfrac, todisk, setfileext, tolerance, standardnames, depracatedwarnings, addheader, default=FALSE) tmpDir(create=TRUE)
format |
character. The default file format to use. See |
overwrite |
logical. The default value for overwriting existing files. If |
datatype |
character. The default data type to use. See dataType |
tmpdir |
character. The default location for writing temporary files; See |
tmptime |
number > 1. The number of hours after which a temporary file will be deleted. As files are deleted when loading the raster package, this option is only useful if you save this option so that it is loaded when starting a new session |
progress |
character. Valid values are "text", "window" and "" (the default in most functions, no progress bar) |
timer |
Logical. If |
chunksize |
integer. Maximum number of bytes to read/write in a single chunk while processing (chunk by chunk) disk based Raster* objects |
maxmemory |
numeric. Maximum number of bytes to read into memory. If a process is expected to require more than this value, |
memfrac |
numeric. Fraction of available RAM that may be used by a process |
todisk |
logical. For debugging only. Default is |
setfileext |
logical. Default is |
tolerance |
numeric. The tolerance used when comparing the origin and resolution of Raster* objects. Expressed as the fraction of a single cell. This should be a number between 0 and 0.5 |
standardnames |
logical. Default is |
depracatedwarnings |
logical. If |
addheader |
character. If not equal to |
default |
logical. If |
create |
logical. If |
list of the current options (invisibly). If no arguments are provided the options are printed.
## Not run: rasterOptions() rasterOptions(chunksize=2e+07) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.