fetch_accessions: Fetch accession passport data and return the paged data...

View source: R/genesys.R

fetch_accessionsR Documentation

Fetch accession passport data and return the paged data structure for further processing. get_accessions might be more useful as it returns a data table.

Description

Fetch accession passport data and return the paged data structure for further processing. get_accessions might be more useful as it returns a data table.

Usage

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

See Also

get_accessions

Examples

## Not run: 
  # Retrieve all accession data by country of origin
  accessions <- genesysr::fetch_accessions(mcpd_filter(ORIGCTY = c("DEU", "SVN")))

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

  # Apply selector function
  accessions <- genesysr::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 May 29, 2024, 3:42 a.m.