cp_datasets: Datasets

View source: R/cp_datasets.R

cp_datasetsR Documentation

Datasets

Description

Datasets

Usage

cp_datasets(q = NULL, start = 0, limit = 10, ...)

cp_dataset(dataset_keys, ...)

Arguments

q

(character) main query string. optional

start

(integer) requested number of offset records. Default: 0

limit

(integer) requested number of maximum records to be returned. Default: 10; max: 1000

...

curl options passed on to verb-GET

dataset_keys

(character) one or more dataset keys. required

Details

for cp_dataset(), separate http requests are made for each dataset key. unfortunately, the output of cp_dataset() is a list for each dataset key because the nested structure of the data is hard to rectangularize

Value

list with two slots

  • result (data.frame/tibble): results, a zero row data.frame if no results found

  • meta (data.frame/tibble): number of results found

Examples

if (cp_up("/dataset")) {
cp_datasets(limit = 1)
}
## Not run: 
cp_datasets(q = "life")
cp_dataset(dataset_keys = 1000)
cp_dataset(dataset_keys = c(3, 1000, 1014))

## End(Not run)

ropensci/rcol documentation built on Sept. 12, 2022, 8:08 a.m.