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
## TRUE TRUE FALSE FALSE NA
is_valid_SEDOL(SEDOL, NA.FALSE = TRUE)
## 0263494 B1F3M59 0263491 A
## TRUE TRUE FALSE FALSE FALSE
Run the code above in your browser using DataLab