sdm_highlight: SDM Leaflet map highlighting extreme values

Description Usage Arguments Value Functions Examples

Description

Create a Leaflet map highlighting extreme values in an SDM output. This can either be minimum, maximum or both values set as a quantile.

Usage

 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
sdm_highlight(
  sdm,
  quantile,
  both.sides = FALSE,
  pts = NULL,
  pal = NULL,
  crs = "standard",
  cluster = FALSE,
  simplify = TRUE
)

## S4 method for signature 'Raster'
sdm_highlight(
  sdm,
  quantile,
  both.sides = FALSE,
  pts = NULL,
  pal = NULL,
  crs = "standard",
  cluster = FALSE,
  simplify = TRUE
)

## S4 method for signature 'data.frame'
sdm_highlight(
  sdm,
  quantile,
  both.sides = FALSE,
  pts = NULL,
  pal = NULL,
  crs = "standard",
  cluster = FALSE,
  simplify = TRUE
)

Arguments

sdm

The SDM/ENM result. Should be a data.frame (XYZ columns) or in the Raster* format.

quantile

A single numeric value between 0 and 1 indicating which quantile to use (will be the same for both sides, if 'both.sides' set to 'TRUE'). For example, if you want the 25 percent higher values, you can set the quantile to 0.75. If you want both higher and lower 25 percent, just put 0.75, and set 'both.sides = TRUE'. Note: setting quantile 1 makes no sense, as it will be 100 percent. The same for setting it 0.5 and 'both.sides = TRUE'.

both.sides

If set to TRUE, than both the higher and lower values will be ploted.

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.

Value

A Leaflet map.

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(sdmvis)
# Load data
data("original_sdm")
data("pa_data")

# Plot
sdm_highlight(sdm = original_sdm[[1]],
                quantile = .75,
                pts = pa_data,
                both.sides = TRUE)

silasprincipe/sdmvis documentation built on Dec. 23, 2021, 2:22 a.m.