check_issn_check_digit {libbib} | R Documentation |
Check the check digit of an ISSN
Description
Takes a string representation of an ISSN and verifies that check digit checks out
Usage
check_issn_check_digit(x, allow.hyphens = TRUE, errors.as.false = FALSE)
Arguments
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 |
errors.as.false |
return false if error instead of throwing error
(default is |
Value
Returns TRUE if check passes, FALSE if not, and NA if NA
Examples
check_issn_check_digit("2434561X") # TRUE
check_issn_check_digit("2434-561X") # TRUE
# vectorized
check_issn_check_digit(c("03785955", "2434561X", NA)) # TRUE TRUE NA
check_issn_check_digit(c("0378-5955", "2434-561X", NA))
# TRUE TRUE NA
[Package libbib version 1.6.4 Index]