is_valid_isbn_13 | R Documentation |
Takes a string representation of an ISBN 13 verifies that it is valid. An ISBN 13 is valid if it is a 13 digit string and the check digit matches
is_valid_isbn_13(x, allow.hyphens = TRUE)
x |
A string of 13 |
allow.hyphens |
A logical indicating whether the hyphen
separator should be allowed
(default is |
Returns TRUE if checks pass, FALSE if not, and NA if NA
is_valid_isbn_13("9780306406157") # TRUE
is_valid_isbn_13("978-0-306-40615-7") # TRUE
# vectorized
is_valid_isbn_10(c("012491540X", "9004037812")) # TRUE FALSE
is_valid_isbn_13(c("978-0-306-40615-7", "9783161484103")) # TRUE FALSE
is_valid_isbn_13(c("978-0-306-40615-7", "hubo un tiempo")) # TRUE FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.