# 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 `search_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 `search_metadata`

## Value

a list of values matching the query

## Description

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

## Examples

    ## <strong>Not run</strong>:
    #     # automatically search each time
    #     dates <- oai_metadata("date")
    #     pub <- oai_metadata("publisher")
    #     table(dates, pub)
    # ## <strong>End(Not run)</strong>
       # Using cached data from an earlier download
        data(metadata)
        dates <- oai_metadata("date", metadata=metadata)
    Error in eval(expr, envir, enclos): could not find function "oai_metadata"
        pub <- oai_metadata("publisher", metadata=metadata)
    Error in eval(expr, envir, enclos): could not find function "oai_metadata"
        table(dates, pub)
    Error in table(dates, pub): object 'dates' not found