is_cusip: Check if an argument is a valid CUSIP string

View source: R/id.R

is_cusipR Documentation

Check if an argument is a valid CUSIP string

Description

Validates CUSIP format including Luhn-variant check digit verification.

Usage

is_cusip(x)

Arguments

x

(any)
Object to check.

Value

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

References

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

Examples

is_cusip("037833100")

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