plotPA | R Documentation |
Plot a presence absence map using the given threshold.
plotPA(
map,
th,
colors = NULL,
hr = FALSE,
filename = "",
overwrite = FALSE,
wopt = list(),
...
)
map |
rast object with the prediction. |
th |
numeric. The threshold used to convert the output in a presence/absence map. |
colors |
vector. Colors to be used, default is |
hr |
logical. If |
filename |
character. If provided the raster map is saved in a file. It must include the extension. |
overwrite |
logical. If |
wopt |
list. Writing options passed to writeRaster. |
... |
Unused arguments. |
A ggplot object.
Sergio Vignali
plotPred.
map <- terra::rast(matrix(runif(400, 0, 1),
nrow = 20,
ncol = 20))
plotPA(map,
th = 0.8)
# Custom colors
plotPA(map,
th = 0.5,
colors = c("#d8b365", "#018571"))
## Not run:
# Save the file. The following command will save the map in the working
# directory. Note that `filename` must include the extension.
plotPA(map,
th = 0.7,
filename = "my_map.tif")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.