powered by
Sets the API key used to authenticate requests to the FRED API. The key persists for the current R session. Alternatively, set the FRED_API_KEY environment variable in your .Renviron file.
FRED_API_KEY
.Renviron
fred_set_key(key)
Invisible NULL.
NULL
Character. A 32-character FRED API key.
Register for a free API key at https://fredaccount.stlouisfed.org/apikeys.
Other configuration: clear_cache(), fred_cache_info(), fred_get_key(), fred_request()
clear_cache()
fred_cache_info()
fred_get_key()
fred_request()
if (FALSE) { fred_set_key("your_api_key_here") }
Run the code above in your browser using DataLab