get_dewey_decimal_subject_division: Conversion from Dewey Decimal call numbers to second-level...

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

get_dewey_decimal_subject_divisionR Documentation

Conversion from Dewey Decimal call numbers to second-level subject description

Description

Takes a string representation of a Dewey Decimal call number (DDC) and returns it's subject description. This uses the first two digits of the DDC number and returns the second most general subject classification.

Usage

get_dewey_decimal_subject_division(x)

Arguments

x

A Dewey Decimal call number

Value

Returns the most general subject classification using the first two digits from the DDC. Returns NA if the DDC looks invalid

Examples


get_dewey_decimal_subject_division("709.05")     # Arts

get_dewey_decimal_subject_division("823.912")
# "English and Old English literatures"

# vectorized
get_dewey_decimal_subject_division(c("709.05", "invalid", NA, "823.912"))
# c("Arts", NA, NA, "English and Old English literatures")


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