rgbif2: Gets occurrence data from GBIF

View source: R/rgbif2.R

rgbif2R Documentation

Gets occurrence data from GBIF

Description

This function uses the rgbif package to get occurrence data of a species.

Usage

rgbif2(
  dir = "results/",
  filename = "output",
  species,
  force = FALSE,
  remove_na = TRUE,
  save = TRUE,
  ...
)

Arguments

dir

Path to directory where the file will be saved. Default is to create a "results/" directory

filename

Name of the output file

species

Genus and specific epithet separated by space. Accepts author if inserted correctly. Either a single value or a vector

force

Logical. Force downloading data for more than 10 species in a loop. Default 'force = FALSE'

remove_na

Logical. Defalt 'TRUE' removes NA in columns decimalLatitude and decimalLongitude

save

Logical. Save output to filename? Defaults to TRUE

...

Any argument from occ_search in rgbif package

Value

A data.frame with the search result. Also saves the output on disk

Author(s)

Sara Mortara & Andrea Sánchez-Tapia

Sara Mortara & Andrea Sánchez-Tapia

Examples

## Not run: 
ex_rgbif <- rgbif2(filename = "ex-gbif",
                   species =  "Asplenium truncorum")

## End(Not run)

saramortara/rocc documentation built on April 3, 2022, 3:41 p.m.