Plot Presence Absence Map
Plot a presence absence map using the given threshold.
plotPA( map, th, colors = NULL, hr = FALSE, filename = NULL, format = "GTiff", ... )
map |
raster 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,
default is |
format |
character. The output format, see writeRaster for all the options, default is Geotiff. |
... |
Additional arguments, see writeRaster for all the options. |
A ggplot object.
Sergio Vignali
map <- raster::raster(matrix(runif(400, 0, 1), 20, 20))
plotPA(map, th = 0.8)
# Custom colors
plotPA(map, th = 0.5, colors = c("#d8b365", "#018571"))
# Save the file
## Not run:
# The following command will save the map in the working directory
plotPA(map, th = 0.7, filename = "my_map", format = "ascii")
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.