| validate | R Documentation |
Validate symbols before retrieving data. This function checks whether the provided ticker strings are valid according to the Yahoo Finance API.
validate(symbol = NULL, index = NA, return_logical = FALSE)
symbol |
A character vector of one or more ticker strings, index or fund names (e.g., |
index |
Deprecated. Use |
return_logical |
A logical value indicating whether to return a named logical vector.
If |
Symbol validation
If return_logical = FALSE (the default), a character vector of valid symbols.
If return_logical = TRUE, a named logical vector indicating validation status for each symbol.
Matching is case-insensitive; returned symbols and names retain the caller's
spelling and order, including dots.
## Not run:
validate("AAPL")
validate(c("AAPL", "NOTASTOCK", "MSFT"))
validate(c("AAPL", "NOTASTOCK", "MSFT"), return_logical = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.