powered by
Takes a string representation of a Library of Congress call number and returns the first letter if and only if the LC Call Number is valid
get_lc_call_first_letter(x, allow.bare = FALSE)
Returns first letter or NA if invalid
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)
FALSE
get_lc_call_first_letter("Q172.5.E77") # Q get_lc_call_first_letter("AF172.5.E77") # NA # vectorized get_lc_call_first_letter(c("Q 172.5", "AF172", "PR6023.A93")) # Q NA P
Run the code above in your browser using DataLab