is_isbn: Check if an argument is an ISBN string

View source: R/id.R

is_isbnR Documentation

Check if an argument is an ISBN string

Description

Validates ISBN-10 and ISBN-13 formats, including check digit verification. Hyphens and spaces are allowed as separators.

Usage

is_isbn(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ISBN string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/International_Standard_Book_Number

Examples

is_isbn("978-0-306-40615-7")

checkstring documentation built on Sept. 28, 2026, 5:07 p.m.