Skip to contents

Download records from FinBIF.

Usage

finbif_records(
  filter,
  select,
  order_by,
  aggregate,
  sample = FALSE,
  n = 10,
  page = 1,
  count_only = FALSE,
  quiet = FALSE,
  cache = getOption("finbif_use_cache"),
  dwc = FALSE,
  seed,
  df = FALSE
)

Arguments

filter

List of named character vectors. Filters to apply to records.

select

Character vector. Variables to return. If not specified, a default set of commonly used variables will be used. Use "default_vars" as a shortcut for this set. Variables can be deselected by prepending a - to the variable name. If only deselects are specified the default set of variables without the deselection will be returned.

order_by

Character vector. Variables to order records by before they are returned. Most, though not all, variables can be used to order records before they are returned. Ordering is ascending by default. To return in descending order append a - to the front of the variable (e.g., "-date_start"). Default order is "-date_start" > "-load_data" > "reported_name".

aggregate

Character. If missing, returns full records. If one or more of "records", "species", "taxa", "events" or "documents" aggregates combinations of the selected variables by counting records, species, taxa, events or documents. Aggregation by events or documents cannot be done in combination with any of the other aggregation types.

sample

Logical. If TRUE randomly sample the records from the FinBIF database.

n

Integer. How many records to download/import.

page

Integer. Which page of records to start downloading from.

count_only

Logical. Only return the number of records available.

quiet

Logical. Suppress the progress indicator for multipage downloads.

cache

Logical. Use cached data.

dwc

Logical. Use Darwin Core (or Darwin Core style) variable names.

seed

Integer. Set a seed for randomly sampling records.

df

Logical. Should the data.frame representation of the records be returned as an attribute?

Value

A finbif_api or finbif_api_list object.

Examples

if (FALSE) {

# Get the last 100 records from FinBIF
finbif_records(n = 100)
}