get_all_lc_call_subject_letters: Get all subject letters of LC Call Number

View source: R/call-numbers-and-subject.R

get_all_lc_call_subject_lettersR Documentation

Get all subject letters of LC Call Number

Description

Takes a string representation of a Library of Congress call number and returns all the subject letters if and only if the LC Call Number is valid

Usage

get_all_lc_call_subject_letters(x, allow.bare = FALSE)

Arguments

x

A Library of Congress call number (string)

allow.bare

A logical indicating whether an LC Call with only the letters should be considered valid (default is FALSE)

Value

Returns all the subject letters or NA if invalid

Examples


get_all_lc_call_subject_letters("Q172.5.E77")
# Q
get_all_lc_call_subject_letters("AF172.5.E77")
# NA

# vectorized
get_all_lc_call_subject_letters(c("Q 172.5", "AF172", "PR6023.A93"))
# Q NA PR


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