Validate Security Identification Numbers
Check whether a given ISIN is valid.
is_valid_ISIN(isin) is_valid_SEDOL(SEDOL, NA.FALSE = FALSE)
isin |
a character vector |
SEDOL |
a character vector |
NA.FALSE |
logical |
Checks a character vector of ISINs and SEDOLs. The
function returns TRUE
if the ISIN is valid; else
FALSE
.
International Securities Identification Numbers (ISINs): The test procedure in ISO 6166 does not differentiate between cases. Thus, ISINs are transformed to uppercase before being tested.
A named logical vector. For is_valid_SEDOL
, a character vector
is attached as an attribute note
.
Enrico Schumann
isin <- c("US0378331005", "AU0000XVGZA3", "DE000A0C3743", "not_an_isin") is_valid_ISIN(isin) is_valid_ISIN(c("US0378331005", "us0378331005")) ## case is ignored SEDOL <- c("0263494", "B1F3M59", "0263491", "A", NA) is_valid_SEDOL(SEDOL) ## 0263494 B1F3M59 0263491 A <NA> ## TRUE TRUE FALSE FALSE NA is_valid_SEDOL(SEDOL, NA.FALSE = TRUE) ## 0263494 B1F3M59 0263491 A <NA> ## TRUE TRUE FALSE FALSE FALSE
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.