fetch_accessions: Fetch accession passport data

Description Usage Arguments Value Examples

View source: R/genesys.R

Description

Fetch accession passport data

Usage

1
2
fetch_accessions(filters = list(), page = NULL, size = 1000,
  selector = NULL, at.least = NULL)

Arguments

filters

an R structure with Genesys filters

page

the page index (0-based)

size

number of records to load per page (page size)

selector

NULL or a function to "select" variables of interest

at.least

stop fetching when at.least records are received from Genesys

Value

Paged data structure

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
  # Retrieve all accession data by country of origin
  accessions <- fetch_accessions(mcpd_filter(ORIGCTY = c("DEU", "SVN")))

  # Fetch Musa
  musa <- genesysr::fetch_accessions(list(taxonomy.genus = c('Musa')))

  # Apply selector function
  accessions <- fetch_accessions(mcpd_filter(ORIGCTY = c("DEU", "SVN")), selector = function(x) {
    list(id = x$id, acceNumb = x$acceNumb, instCode = x$institute$code)
  })

## End(Not run)

genesysr documentation built on Dec. 1, 2019, 1:16 a.m.