faster | R Documentation |
faster()
either sets or gets options used across fasterRaster functions. Its use can vary:
Get current values of a particular option: Use faster("option_name")
. Values will remain unchanged.
Get current values of all options: Use faster()
(no arguments). Values will remain unchanged.
Get default values of a particular option: Use faster("option_name", default = TRUE)
. Values will remain unchanged.
Get default values of all options: Use faster(default = TRUE)
. Values will remain unchanged.
Set values of particular options: Use the form faster(option 1 = value1, option2 = value2)
.
Set all options to their defaults: Use faster(restore = TRUE)
.
You cannot simultaneously get and set options.
faster(..., default = FALSE, restore = FALSE)
... |
Either:
Options include:
|
default |
Logical: Return the default value(s) of the option(s). The default value of |
restore |
Logical: If |
If options are changed, then a named list of option values before they were changed is returned invisibly.
If option values are requested, a named list with option values is returned (not invisibly).
if (grassStarted()) {
# See current values for options:
faster("grassDir")
faster("addonsDir")
faster("clean")
faster("cores")
faster("memory")
faster("useDataTable")
faster("verbose")
faster("workDir")
faster() # all options
# See default values for options:
faster("cores", default = TRUE)
faster(default = TRUE) # all options
# Set options (change accordingly for your system!!!)
if (FALSE) {
opts. <- faster() # remember starting values of options
faster(grassDir = "C:/Program Files/GRASS GIS 8.4")
faster(verbose = TRUE, memory = 1024, cores = 1)
faster(c("grassDir", "verbose", "memory", "cores"))
faster(opts.) # reset options to starting values
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.