Description Usage Arguments Value Functions Examples
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | sdm_thresh(
sdm,
thresh,
tname = NULL,
pts = NULL,
pal = NULL,
crs = "standard",
cluster = FALSE,
simplify = TRUE,
thresh.color = NULL
)
## S4 method for signature 'Raster'
sdm_thresh(
sdm,
thresh,
tname = NULL,
pts = NULL,
pal = NULL,
crs = "standard",
cluster = FALSE,
simplify = TRUE,
thresh.color = NULL
)
## S4 method for signature '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
1 2 3 4 5 6 7 8 9 10 | library(sdmvis)
# Load data
data("original_sdm")
data("pa_data")
# Plot
sdm_thresh(sdm = original_sdm[[1]],
thresh = -2,
tname = "TSS",
pts = pa_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.