normalize_isbn_10 | R Documentation |
Takes a string representation of an ISBN 10. Strips all non-digit and non-"X" characters and checks if it is valid (whether the check digit works out, etc). User can specify whether "aggressive" measures should be taken to salvage the malformed ISBN 10 string.
normalize_isbn_10(x, aggressive = TRUE, convert.to.isbn.13 = FALSE)
x |
A string |
aggressive |
A logical indicating whether aggressive measures
should be taken to try to get the "ISBN 10"
into a valid form. See "Details" for more info
(default is |
convert.to.isbn.13 |
A logical indicating whether the ISBN 10
should be converted into an ISBN 13
(default is |
If aggressive
is TRUE, aggressive measures are taken to
try to salvage the malformed ISBN 10 string. If the ISBN 10, for example,
is 9 digits, and either adding an "X" to the end, or leading "0"s fix it,
this function will return the salvaged ISBN 10. If the ISBN 10 has
garbage digits/characters in the front and has an "X" check digit,
it will return the salvaged ISBN 10.
Returns valid ISBN 10 if possible, NA if not
normalize_isbn
normalize_isbn_13
normalize_isbn_10("012491540x") # "012491540X"
normalize_isbn_10("012491540x xe32ea") # "012491540X"
normalize_isbn_10("012491540x", convert.to.isbn.13=TRUE)
# "9780124915404"
normalize_isbn_10("513213012491540x") # "012491540X"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.