knitr::opts_chunk$set(
    comment = "#>",
    collapse = TRUE,
    warning = FALSE,
    message = FALSE
)

oai introduction

A general purpose client to work with any 'OAI-PMH' service.

The 'OAI-PMH' protocol is described at http://www.openarchives.org/OAI/openarchivesprotocol.html.

The main functions follow the OAI-PMH verbs:

Get oai

Install from CRAN

install.packages("oai")

Or install the development version from GitHub

devtools::install_github("ropensci/oai")

Load oai

library("oai")

Identify

id("http://oai.datacite.org/oai")

ListIdentifiers

list_identifiers(from = '2018-05-01T', until = '2018-09-01T')

Count Identifiers

count_identifiers()

ListRecords

list_records(from = '2018-05-01T', until = '2018-05-15T')

GetRecords

ids <- c("87832186-00ea-44dd-a6bf-c2896c4d09b4", "d981c07d-bc43-40a2-be1f-e786e25106ac")
get_records(ids)

List MetadataFormats

list_metadataformats(id = "87832186-00ea-44dd-a6bf-c2896c4d09b4")

List Sets

list_sets("http://api.gbif.org/v1/oai-pmh/registry")

Biodiversity Heritage Library

Identify

id("http://www.biodiversitylibrary.org/oai")

Get records

get_records(c("oai:biodiversitylibrary.org:item/7", "oai:biodiversitylibrary.org:item/9"),
            url = "http://www.biodiversitylibrary.org/oai")


ropensci/oai documentation built on Nov. 18, 2022, 5:33 p.m.