import_functions: Import functions

Description Usage Arguments Value Examples

Description

These are some basic functions to interact with the API to import data and monitor the submitted jobs. See the full help on the package vignettes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
odb_get_jobs(params = list(), odb_cfg = odb_config(), simplify = TRUE)

odb_get_log(job_id, odb_cfg = odb_config())

odb_get_affected_ids(job_id, odb_cfg = odb_config())

odb_import_individuals(data, odb_cfg = odb_config(), common = list())

odb_import_locations(data, odb_cfg = odb_config(), common = list())

odb_import_measurements(data, odb_cfg = odb_config(), common = list())

odb_import_persons(data, odb_cfg = odb_config(), common = list())

odb_import_taxons(data, odb_cfg = odb_config(), common = list())

odb_import_traits(data, odb_cfg = odb_config(), common = list())

odb_import_vouchers(data, odb_cfg = odb_config(), common = list())

Arguments

params

named list, named vector or character string. Represents the parameters to be sent for the server, such as "valid=1" to return only valid taxons. See odb_params

odb_cfg

list. A configuration object, as generated by odb_config

simplify

logical. Should the results be 'unlisted' before being returned?

job_id

numeric. A single job id

data

The data to be imported. The format is quite flexible, but normally a named data.frame is the best choice. See package vignettes for details

common

Optional. A named list containing fields which are common to all imported data.

Value

odb_import methods usually return the submitted job id retrieved with odb_config

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data = data.frame(
  name = c("Euterpe oleracea", "Euterpe edulis"),
  parent = "Euterpe",
  level=odb_taxonLevelCodes('species'),
)
odb_import_taxons(data, cfg)

## End(Not run)

opendatabio/opendatabio-r documentation built on Sept. 27, 2021, 1:32 a.m.