convert_to_isbn_13: Convert ISBN 10 to ISBN 13

View source: R/bibcodes.R

convert_to_isbn_13R Documentation

Convert ISBN 10 to ISBN 13

Description

Takes a string representation of an ISBN 10 and converts it to an ISBN 13.

Usage

convert_to_isbn_13(x, skip.validity.check = FALSE, errors.as.nas = FALSE)

Arguments

x

A string of 10 digits or 9 digits with terminal "X"

skip.validity.check

Skip the checking for whether the ISBN 10 is valid (default is FALSE)

errors.as.nas

return NA if error instead of throwing error (default is FALSE)

Value

Returns ISBN 13 as a string

Examples


convert_to_isbn_13("012491540X")                # 9780124915404

# vectorized
convert_to_isbn_13(c("012491540X", "9004037810"))
# "9780124915404" "9789004037816"


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