plot_GRASS {rdwplus} | R Documentation |
A function to plot a raster from the current GRASS mapset
Description
Given the name of a raster in the current GRASS mapset, this function will plot it as a stars
object.
Usage
plot_GRASS(x, colours, out_x, ...)
Arguments
x |
The name of an object in the current GRASS mapset. |
colours |
Optional. A colour scale. If not supplied, the default settings in |
out_x |
Optional. If supplied, the function makes a call to |
... |
Additional arguments to |
Value
Nothing.
Examples
# Will only run if GRASS is running
# You should load rdwplus and initialise GRASS via the initGRASS function
if(check_running()){
# Load data set
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
# Set environment
set_envir(dem)
# Plot
plot_GRASS("dem.tif") # argument must match name of data set in the mapset
plot_GRASS("dem.tif", heat.colors(10)) # with different colour scale
}
[Package rdwplus version 1.0.0 Index]