
Takes a string representation of a Library of Congress call number and returns either TRUE or FALSE based on whether or not the input fits the canonical LC Call Number pattern
is_valid_lc_call(x, allow.bare = FALSE)
Returns either TRUE or FALSE based on whether the call number is valid
A Library of Congress call number (string)
A logical indicating whether an LC Call with only
the letters should be considered valid
(default is FALSE
)
is_valid_lc_call("Q172.5.E77")
# TRUE
is_valid_lc_call("AF172.5.E77")
# FALSE
# vectorized
is_valid_lc_call(c("Q 172.5", "AF172", "PR6023.A93"))
# TRUE FALSE TRUE
Run the code above in your browser using DataLab