loc_permalink_from_lccn: Get Library of Congress catalog permalinks from LCCNs

View source: R/the-web.R

loc_permalink_from_lccnR Documentation

Get Library of Congress catalog permalinks from LCCNs

Description

Takes a string representation of an LCCNs. Returns permalinks to the Library of Congress catalog entries using those LCCNs.

Usage

loc_permalink_from_lccn(x, normalize = TRUE, format = "")

Arguments

x

A string (or vector of strings) of LCCNs

normalize

a logical indicating whether the LCCN should be normalized prior to creating the permalink (default is TRUE)

format

One of "", "marcxml", "mods", "mads", or "dublin" to return the link to the main permalink page, or the link directly to the record's MARCXml, MODS, MADS, or Dublin Core representation, respectively.

Details

If normalize=TRUE and the LCCN is invalid, the permalink is NA. If normalize=FALSE, the permalink may be invalid. No validity check on the URL is performed

Value

Library of Congress permalinks using LCCNs.

Examples

loc_permalink_from_lccn("n78-890351")        # "https://lccn.loc.gov/n78890351"
loc_permalink_from_lccn("85-2 ")             # "https://lccn.loc.gov/85000002"
loc_permalink_from_lccn("75-425165//r75")    # "https://lccn.loc.gov/75425165"

# vectorized
loc_permalink_from_lccn(c("###78890351#", NA, "n78-890351"))

# MARCXML metadata format
loc_permalink_from_lccn("73167510", format="marcxml")
# "https://lccn.loc.gov/73167510/marcxml"


libbib documentation built on Nov. 10, 2022, 6:16 p.m.