is_valid_issn | R Documentation |
Takes a string representation of an ISSN verifies that it is valid. An ISSN is valid if it is a 8 digit string or a 7 digit string with a terminal "X" AND the check digit matches
is_valid_issn(x, allow.hyphens = TRUE, lower.x.allowed = TRUE)
x |
A string of 8 digits or 7 digits with terminal "X" |
allow.hyphens |
A logical indicating whether the hyphen
separator should be allowed
(default is |
lower.x.allowed |
A logical indicating whether ISSNs with
a check digit with a lower-case "x" should
be treated as valid
(default is |
Returns TRUE if checks pass, FALSE if not, and NA if NA
is_valid_issn("2434561X") # TRUE
is_valid_issn("2434-561X") # TRUE
# vectorized
is_valid_issn(c("2434-561X", "2434-5611", "0378-5955", NA))
# TRUE FALSE TRUE NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.