if (FALSE) {
library(sf)
# first, we download an example shapefile to use (a species range)
BIEN_ranges_species("Carnegiea gigantea")#saves range to the current working directory
# load the range map as an sf object
sf <- st_read(dsn = ".",layer = "Carnegiea_gigantea")
# get the occurrences that occur within the polygon.
species_occurrences <- BIEN_occurrence_sf(sf = sf)
}
Run the code above in your browser using DataLab