Learn R Programming

treebase (version 0.0-6)

oai_metadata: Search the OAI-PMH metadata by date, publisher, or identifier

Description

Search the OAI-PMH metadata by date, publisher, or identifier

Usage

oai_metadata(x = c("date", "publisher", "author", "title", "Study.id", "attributes"),
    metadata = NULL, ...)

Arguments

x
one of "date", "publisher", "identifier" for the study
metadata
returned from download_metadata function. if not specified will download latest copy from treebase. Pass in the value during repeated calls to speed function runtime substantially
...
additional arguments to download_metadata

Value

  • a list of values matching the query

Examples

Run this code
# automatically search each time (note: this calls internal function now)
    dates <- treebase:::oai_metadata("date")
    pub <- treebase:::oai_metadata("publisher")
    table(dates, pub)
   # Using cached data from an earlier download
    data(metadata)
    dates <- treebase:::oai_metadata("date", metadata=metadata)
    pub <- treebase:::oai_metadata("publisher", metadata=metadata)
    table(dates, pub)

Run the code above in your browser using DataLab