powered by
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)
Returns TRUE if checks pass, FALSE if not, and NA if NA
A string of 8 digits or 7 digits with terminal "X"
A logical indicating whether the hyphen separator should be allowed (default is TRUE)
TRUE
A logical indicating whether ISSNs with a check digit with a lower-case "x" should be treated as valid (default is TRUE)
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
Run the code above in your browser using DataLab