Description Usage Arguments Details Value Examples
Add a convex hull to a map
1 |
x |
input |
... |
ignored |
Can be used with map_leaflet()
, map_plot()
,
and map_ggplot()
. Other methods in this package may be supported
in the future.
Adds a convex hull to the plot. See grDevices::chull()
for info.
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 | # map spocc output, here using a built in object
data(occdat_eg1)
map_plot(occdat_eg1, hull = TRUE)
# map rgbif output, here using a built in object
hull(map_ggplot(occdat_eg1))
## Not run:
# leaflet
library("spocc")
spp <- c('Danaus plexippus', 'Accipiter striatus', 'Pinus contorta')
dat <- occ(spp, from = 'gbif', limit = 30, has_coords = TRUE)
hull(map_leaflet(dat))
# ggplot
if (requireNamespace("rgbif")) {
library("rgbif")
res <- occ_search(scientificName = "Puma concolor", limit = 100)
hull(map_ggplot(res))
}
# base plots
library("spocc")
out <- occ(query='Accipiter striatus', from='gbif', limit=25,
has_coords=TRUE)
map_plot(out, hull = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.