get_isbn_13_check_digit("9780306406157")
# 12 digit string
get_isbn_13_check_digit("978030640615")
get_isbn_13_check_digit("onetwothreefo", errors.as.nas=TRUE) # NA
# vectorized
get_isbn_13_check_digit(c("9780306406157", "9783161484100"))
Run the code above in your browser using DataLab