Learn R Programming

ridigbio (version 0.4.1)

idig_search_media: Searching of iDigBio media records

Description

Function to query the iDigBio API for media records

Usage

idig_search_media(
  mq = FALSE,
  rq = FALSE,
  fields = FALSE,
  max_items = 1e+05,
  limit = 0,
  offset = 0,
  sort = FALSE,
  ...
)

Value

A data frame with fields requested or the following default fields:

  • accessuri

  • datemodified: Date last modified, which is assigned by iDigBio.

  • dqs: Data quality score assigned by iDigBio.

  • etag: Tag assigned by iDigBio.

  • flags: Data quality flag assigned by iDigBio.

  • format

  • hasSpecimen: TRUE or FALSE, indicates if there is an associated record for this media.

  • licenselogourl

  • mediatype: Media object type.

  • modified

  • recordids: List of UUID for associated records.

  • records: UUID for the associated record.

  • recordset: Record set ID assigned by iDigBio.

  • rights

  • tag

  • type

  • uuid: Unique identifier assigned by iDigBio.

  • version: Media record version assigned by iDigBio.

  • webstatement

  • xpixels: As defined by EXIF, x dimension in pixel.

  • ypixels: As defined by EXIF,y dimension in pixels.

Arguments

mq

iDigBio media query in nested list format

rq

iDigBio record query in nested list format

fields

vector of fields that will be contained in the data.frame, defaults to "all" which is all indexed fields

max_items

maximum number of results allowed to be retrieved (fail -safe)

limit

maximum number of results returned

offset

number of results to skip before returning results

sort

vector of fields to use for sorting, UUID is always appended to make paging safe

...

additional parameters

Author

Matthew Collins

Details

Also see idig_search_records for the full examples of all the parameters related to searching iDigBio.

Wraps idig_search to provide defaults specific to searching media records. Using this function instead of idig_search directly is recommened. Record queries and media queries objects are allowed (rq and mq parameters) and media records returned will match the requirements of both.

This function defaults to returning all indexed media record fields.

Examples

Run this code
if (FALSE) {
# Searching for media using a query on related specimen information - first
# 10 media records with image URIs related to a specimen in the genus Acer:
df <- idig_search_media(rq=list(genus="acer"),
                        mq=list("data.ac:accessURI"=list("type"="exists")),
                        fields=c("uuid","data.ac:accessURI"), limit=10)
}

Run the code above in your browser using DataLab