Skip to contents

Search and retrieve species occurrences in Costa Rica from gbif (GBIF) and iNaturalist (iNaturalist).

This function is a wrapper of the occ function from the spocc package.

Usage

get_locations(species_name, sf = FALSE)

Arguments

species_name

Genus and species (for example, "Desmodus rotundus")

sf

Logical. Return a spatial (sf) or a data frame

Value

A data frame if sf = FALSE (default), or an sf object if sf = TRUE.

Examples


loc <- get_locations("Agalychnis callidryas")
#> Error in occ(query = species_name, from = c("gbif", "inat"), geometry = st_bbox(cr_outline),     has_coord = TRUE): could not find function "occ"
head(loc)
#> Error in eval(expr, envir, enclos): object 'loc' not found