.Renviron
File for Repeated UseR/utils.R
fmp_api_key.Rd
This function will add your FMP API key to your .Renviron
file
so it can be called securely without being stored in your code.
After you have installed your key, it can be called any time by
typing Sys.getenv('FMP_API_KEY')
.
fmp_api_key(key, install = TRUE, overwrite = FALSE)
key |
|
---|---|
install |
|
overwrite |
|
if (FALSE) { key <- "my_api_key" fmp_api_key(key) # first time, either reload your environment or restart R # reload environment with the following readRenviron("~/.Renviron") # you can check it with: Sys.getenv("FMP_API_KEY") }