get_dewey_decimal_subject_class {libbib} | R Documentation |
Takes a string representation of a Dewey Decimal call number (DDC) and returns it's subject description. This uses the hundreds place of the DDC number and returns the most general subject classification.
get_dewey_decimal_subject_class(x)
x |
A Dewey Decimal call number |
Returns the most general subject classification using the hundreds places from the DDC. Returns NA if the DDC looks invalid
get_dewey_decimal_subject_class("709.05") # Arts
get_dewey_decimal_subject_class("823.912")
# Literature (Belles-lettres) and rhetoric
# vectorized
get_dewey_decimal_subject_class(c("709.05", "invalid", NA, "823.912"))
# c("Arts", NA, NA, "Literature (Belles-lettres) and rhetoric")