Learn R Programming

libbib (version 1.6.4)

marc_leader_get_info: 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)

Value

A data.table

Arguments

x

A string (or vector of strings) of MARC leaders

Examples

Run this code

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

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

Run the code above in your browser using DataLab