set_envir | R Documentation |
This function simplifies the process of setting up a GRASS environment with parameters such as cell snapping, size and mapset extent.
set_envir(file, ...)
file |
The file path to a raster that should be used to set environment parameters such as the projection, cell size, extent, etc. The |
... |
Optional arguments for |
Nothing. Displays current environment settings.
# Will only run if GRASS is running
# You should load rdwplus and initialise GRASS with initGRASS
if(check_running()){
# Load data set
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
# Set environment
set_envir(dem)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.