View source: R/validate_cusip.R
validate_cusip | R Documentation |
Using the CUSIP Global services methodology, this function checks the validity of CUSIPs. The check relies on the Modulus 10 Double Add Double algorithm. It does not query to check the assignment of any identifier only its compositional validity. This is useful for checking hand or OCR generated input. All non-9 digit inputs will return as FALSE (i.e. invalid cusip).
validate_cusip(cusips)
cusips |
A character vector of presumed CUSIP identifiers |
Returns a logical vector of CUSIP validity
# check vector of CUSIPs for validity
x <- c("037833100", "0378331O0")
validate_cusip(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.