Description Usage Arguments Value Examples
Create a Leaflet map with the presence or presence/absence locations. Good for spotting problematic points.
1 | pts_leaflet(pts, cols = NULL, cluster = FALSE, popinfo = NULL)
|
pts |
A data frame containing the presence or presence/absence points. 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). |
cols |
Character string indicating the color for the points or a character vector of length 2 indicating the colors for the presence and absence, respectively. If not supplied, the default will be used. |
cluster |
Should the points be clustered (i.e., aggregated)? Only valid if 'pts' is supplied. Default is FALSE. |
popinfo |
An optional vector of values to be used in the popup box when clicking in a point. Can be either a number indicating the column of the data.frame (this may be useful for e.g. showing value for a certain variable) or a character vector of length = number of points. If not supplied, the number of the row will be used (this may be useful for spotting points with problems). |
A Leaflet map with the points.
1 2 3 4 5 | library(sdmvis)
# Load data
data("pa_data")
# Plot
pts_leaflet(pts = pa_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.