marc_leader_get_info: Get info from MARC leader

View source: R/marc-field-deconstruction.R

marc_leader_get_infoR Documentation

Get info from MARC leader

Description

Takes one or more MARC leaders (string/strings) and returns a data.table containing the record type and bib level

Usage

marc_leader_get_info(x)

Arguments

x

A string (or vector of strings) of MARC leaders

Value

A data.table

Examples


marc_leader_get_info("00000cam a22000008i 4500")
#          record_type      bib_level
#               <char>         <char>
# 1: Language Material Monograph/Item

# vectorized
marc_leader_get_info(c("00000cam a2200000Ma 4500", NA,
                       "00000cem a2200000Ma 4500"))
#              record_type      bib_level
#                    <char>         <char>
#  1:     Language Material Monograph/Item
#  2:                  <NA>           <NA>
#  3: Cartographic material Monograph/Item


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