sdm_thresh.Rd
Create a Leaflet map with the results of an SDM and draw how different thresholds will result. This map can be explored interactively in the viewer, so its possible to have a better comprehension of the outcomes of your SDM.
sdm_thresh( sdm, thresh, tname = NULL, pts = NULL, pal = NULL, crs = "standard", cluster = FALSE, simplify = TRUE, thresh.color = NULL ) # S4 method for Raster sdm_thresh( sdm, thresh, tname = NULL, pts = NULL, pal = NULL, crs = "standard", cluster = FALSE, simplify = TRUE, thresh.color = NULL ) # S4 method for data.frame sdm_thresh( sdm, thresh, tname = NULL, pts = NULL, pal = NULL, crs = "standard", cluster = FALSE, simplify = TRUE, thresh.color = NULL )
sdm | The SDM/ENM result. Should be in the Raster* format. |
---|---|
thresh | A vector containing the thresholds to be applied (numeric values). |
tname | An optional character vector containing the names of the thresholds to be used in the legend. If not supplied, numerals will be used instead. |
pts | A data frame containing the presence or presence/absence points (optional). The first column should be longitude (x) and the sencond latitude (y). In the case of presence/absence data, an additional collumn should be provided, coded as 0 (absence) and 1 (presence). |
pal | Character string indicating the name of the continuous mode palette (see gen_pal). If not supplied, the default will be used. |
crs | Enables to change the default projection used in the Leaflet package. For now, not functional. |
cluster | Should the points be clustered (i.e., aggregated)? Only valid if `pts` is supplied. Default is FALSE. |
simplify | Should the polygons be simplified? If TRUE, the output became lighter. |
thresh.color | Vector of color(s) to be used for the threshold(s) polygon(s) |
A Leaflet map.
sdm_thresh,Raster-method
: Method for Raster*
sdm_thresh,data.frame-method
: Method for data frames
library(sdmvis) # Load data data("original_sdm") data("pa_data") # Plot sdm_thresh(sdm = original_sdm[[1]], thresh = -2, tname = "TSS", pts = pa_data)#> Warning: Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs#> Warning: Discarded datum World Geodetic System 1984 in Proj4 definition#> Warning: Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs#> Warning: Discarded datum World Geodetic System 1984 in Proj4 definition#> Warning: input and ouput crs are the same#> Warning: Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs#> Warning: Discarded datum World Geodetic System 1984 in Proj4 definition#> Warning: Some values were outside the color scale and will be treated as NA#> Warning: CRS object has comment, which is lost in output