Users of fredr must authenticate with the FRED API by use of an
API key. This key should be stored as an environment variable,
fredr_get_key() will retrieve the key, if set, or it will return
if the key is unset.
fredr_set_key() will set the key for the current R session. For
persistence across sessions, set the environment variable.
See the Details section for more information.
TRUE if a key can be found. Otherwise it
1 2 3 4 5
A valid FRED API key as a string. Obtain one at the API Keys page. Can also be
The preferred method to set the key is to set the
environment variable in an
.Renviron file. The easiest way to do this is
usethis::edit_r_environ(). Don't forget to restart R after
setting the key.
See St. Louis Fed Web Services API Keys to obtain an API key.
1 2 3 4 5 6 7 8 9 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.