check_isbn_10_check_digit | R Documentation |
Takes a string representation of an ISBN 10 and verifies that check digit checks out
check_isbn_10_check_digit(x, allow.hyphens = TRUE, errors.as.false = TRUE)
x |
A string of 10 digits or 9 digits with terminal "X" |
allow.hyphens |
A logical indicating whether the hyphen
separator should be allowed
(default is |
errors.as.false |
return false if error instead of throwing error
(default is |
Returns TRUE if check passes, FALSE if not, and NA if NA
check_isbn_10_check_digit("012491540X") # TRUE
check_isbn_10_check_digit("0-124-91540-X") # TRUE
# vectorized
check_isbn_10_check_digit(c("012491540X", "9004037812")) # TRUE FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.