Learn R Programming

genesysr (version 0.9.2)

fetch_accessions: Fetch accession passport data

Description

Fetch accession passport data

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

Examples

Run this code
# 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)
  })
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab