finbif_occurrence_load {finbif} | R Documentation |
Load FinBIF occurrence records from a file
Description
Load occurrence data from a file as a data.frame
.
Usage
finbif_occurrence_load(
file,
select = NULL,
n = -1,
count_only = FALSE,
quiet = getOption("finbif_hide_progress"),
cache = getOption("finbif_use_cache"),
dwc = FALSE,
date_time_method = NULL,
tzone = getOption("finbif_tz"),
write_file = tempfile(),
dt = NA,
keep_tsv = FALSE,
facts = list(),
type_convert_facts = TRUE,
drop_na = FALSE,
drop_facts_na = drop_na,
locale = getOption("finbif_locale"),
skip = 0
)
Arguments
file |
Character or Integer. Either the path to a Zip archive or
tabular data file that has been downloaded from "laji.fi", a URI
linking to such a data file (e.g.,
https://tun.fi/HBF.49381) or an integer
representing the URI (i.e., |
select |
Character vector. Variables to return. If not specified, a
default set of commonly used variables will be used. Use |
n |
Integer. How many records to import. Negative and other invalid values are ignored causing all records to be imported. |
count_only |
Logical. Only return the number of records available. |
quiet |
Logical. Suppress the progress indicator for multipage
downloads. Defaults to value of option |
cache |
Logical or Integer. If |
dwc |
Logical. Use Darwin Core (or Darwin Core style) variable names. |
date_time_method |
Character. Passed to |
tzone |
Character. If |
write_file |
Character. Path to write downloaded zip file to if |
dt |
Logical. If package, |
keep_tsv |
Logical. Whether to keep the TSV file if |
facts |
List. A named list of "facts" to extract from supplementary
"fact" files in a local or online FinBIF data archive. Names can include
one or more of |
type_convert_facts |
Logical. Should facts be converted from character to numeric or integer data where applicable? |
drop_na |
Logical. A vector indicating which columns to check for missing data. Values recycled to the number of columns. Defaults to all columns. |
drop_facts_na |
Logical. Should missing or "all |
locale |
Character. One of the supported two-letter ISO 639-1 language
codes. Current supported languages are English, Finnish and Swedish. For
data where more than one language is available the language denoted by
|
skip |
Integer. The number of lines of the data file to skip before beginning to read data (not including the header). |
Value
A data.frame
, or if count_only = TRUE
an integer.
Examples
## Not run:
# Get occurrence data
finbif_occurrence_load(49381)
## End(Not run)