marc_008_get_info {libbib} | R Documentation |
Get info from MARC control field 008
Description
Takes one or more MARC 008 fields (string/strings) and returns a
data.table
containing the publication date, publication
place code, and language code.
Usage
marc_008_get_info(
x,
original.pub.date = FALSE,
include.questionable.dates = FALSE
)
Arguments
x |
A string (or vector of strings) of LCCNs |
original.pub.date |
If |
include.questionable.dates |
A logical indicating whether "questionable"
dates should be replaced with |
Details
If any date element is "unknown" (contains a "u"), the returned date is NA. The returned date is always an integer.
Value
A data.table
Examples
# reissue publication date
marc_008_get_info("950622r19701880ru 000 0 rus d")
# pub_date pub_place_code lang_code
# <int> <char> <char>
# 1: 1970 ru rus
# The Brothers Karamazov (1970 reissue but original publication date)
marc_008_get_info("950622r19701880ru 000 0 rus d",
original.pub.date=TRUE)
# pub_date pub_place_code lang_code
# <int> <char> <char>
# 1: 1880 ru rus
# vectorized
marc_008_get_info(c("101106s1992 gr 000 1 gre d", NA,
"180528s2017 ag 000 j spa d"))
# pub_date pub_place_code lang_code
# <int> <char> <char>
# 1: 1992 gr gre
# 2: NA <NA> <NA>
# 3: 2017 ag spa
[Package libbib version 1.6.4 Index]