Skip to contents

Reads the tab-delimited table of a GBIF "simple" or Darwin Core occurrence download, either the unzipped .csv file or the downloaded .zip. All columns are read as text, so that coordinates keep the decimals exactly as written (needed by the coarse_decimals test of filter_occurrences()).

Usage

read_gbif(file)

Arguments

file

Path to the GBIF .csv (tab-delimited) or .zip file.

Value

A data.frame with all columns as character.

Details

GBIF tables contain stray quotes and tabs in free-text fields, so quoting is switched off, as GBIF recommends. The fast readr package is used when it is installed.

Examples

if (FALSE) { # \dontrun{
occ <- read_gbif("0020328-260928105237408.zip")
} # }