Package 'rdryad'

Title: Access for Dryad Web Services
Description: Interface to the Dryad "Solr" API, their "OAI-PMH" service, and fetch datasets. Dryad (<https://datadryad.org/>) is a curated host of data underlying scientific publications.
Authors: Karthik Ram [aut] , Scott Chamberlain [aut, cre] , Carl Boettiger [aut]
Maintainer: Scott Chamberlain <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1.95
Built: 2024-10-28 06:06:23 UTC
Source: https://github.com/ropensci/rdryad

Help Index


Interface to the Dryad Web services

Description

Includes access to Dryad's Solr API, OAI-PMH service, and part of their REST API.

Package API

The functions match the three major sets of Dryad API routes for datasets, fiiles and versions.

Datasets:

Files:

Versions:

Defunct

The Dryad Solr API is no longer being updated, so the functions that used to work with it are all defunct, see solr-defunct

The Dryad OAI-PMH service is no longer being updated, so the functions that used to work with it are all defunct, see oai-defunct

More defunct functions:


Get datasets by DOI(s)

Description

Get datasets by DOI(s)

Usage

dryad_dataset(dois, ...)

Arguments

dois

(character) one or more DOIs, required

...

Further args passed on to crul::verb-GET

Value

a list of lists, each named by the input DOI

See Also

Other dryad-datasets: dryad_dataset_versions(), dryad_datasets()

Examples

## Not run: 
dryad_dataset(doi = "10.5061/dryad.f385721n")
dois <- c("10.5061/dryad.f385721n", "10.5061/dryad.7ct1n", "10.5061/dryad.1g626")
dryad_dataset(dois = dois)

## End(Not run)

Get dataset versions by DOI(s)

Description

Get dataset versions by DOI(s)

Usage

dryad_dataset_versions(dois, ...)

Arguments

dois

(character) one or more DOIs, required

...

Further args passed on to crul::verb-GET

Value

a list of lists, each named by the input DOI

See Also

Other dryad-datasets: dryad_datasets(), dryad_dataset()

Examples

## Not run: 
x = dryad_dataset_versions(dois = "10.5061/dryad.f385721n")
x
dois <- c("10.5061/dryad.f385721n", "10.5061/dryad.7ct1n", "10.5061/dryad.1g626")
dryad_dataset_versions(dois = dois)

## End(Not run)

List datasets

Description

List datasets

Usage

dryad_datasets(...)

Arguments

...

Named key-value sequeunce of parameters passed to Dryad query such as "page" (nunber), or "per_page".

Value

a tibble

See Also

Other dryad-datasets: dryad_dataset_versions(), dryad_dataset()

Examples

## Not run: 
(x <- dryad_datasets())
x$meta
x$links
x$data
x <- dryad_datasets(per_page = 50, page = 7)

## End(Not run)

dryad_download

Description

Download datasets by their DOI(s)

Usage

dryad_download(dois, ...)

Arguments

dois

(character) one or more DOIs, required

...

Further args passed on to crul::verb-GET

Value

file path for the file

Examples

## Not run: 
dryad_download(dois = "10.5061/dryad.f385721n")
dois <- c("10.5061/dryad.f385721n", "10.5061/dryad.7ct1n", "10.5061/dryad.1g626")
dryad_download(dois = dois)

## End(Not run)

Get metadata information about a file

Description

Get metadata information about a file

Usage

dryad_files(ids, ...)

Arguments

ids

(numeric) one or more file ids, required

...

Further args passed on to crul::verb-GET

Value

a list of lists, each named by the input DOI

See Also

Other dryad-files: dryad_files_download()

Examples

## Not run: 
dryad_files(ids = 61859)
dryad_files(ids = 61858)
dryad_files(ids = c(61858, 61859))

## End(Not run)

Download a specific file

Description

Download a specific file

Usage

dryad_files_download(ids, ...)

Arguments

ids

(numeric) one or more file ids, required

...

Further args passed on to crul::verb-GET

Value

a list of lists, each named by the input DOI

Note

UPDATE: we used to not use caching in this fxn; we do now as of 2020-12-15

See Also

Other dryad-files: dryad_files()

Examples

## Not run: 
dryad_files_download(ids = 61858)
dryad_files_download(ids = 61859)

## End(Not run)

Get 'rdryad' cache data as a hoardr object

Description

Used primarily to modify the cache directory and set with dryad_set_cache.

Usage

dryad_get_cache()

Value

A hoardr object defining the cache directory.


Set the 'rdryad' cache by passing a hoardr object defining cache data including local path.

Description

Set the 'rdryad' cache by passing a hoardr object defining cache data including local path.

Usage

dryad_set_cache(obj)

Arguments

obj

A hoardr object returned from dryad_get_cache.

Value

(Invisibly) The update cache object.


Get a dataset version by version ID

Description

Get a dataset version by version ID

Usage

dryad_versions(ids, ...)

dryad_versions_files(ids, ...)

dryad_versions_download(ids, ...)

Arguments

ids

(numeric/integer) one or more version ids, required

...

Further args passed on to crul::verb-GET

Details

dryad_versions() and dryad_versions_files() use async http requests, while dryad_versions_download() does not use async

Value

a list of lists, each named by the input DOI

Examples

## Not run: 
dryad_versions(ids = 18774)
dryad_versions_files(ids = 18774)
dryad_versions_download(ids = 18774)

## End(Not run)