Learn R Programming

fred (version 0.3.1)

fred_set_key: Set the FRED API key

Description

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.

Usage

fred_set_key(key)

Value

Invisible NULL.

Arguments

key

Character. A 32-character FRED API key.

Details

Register for a free API key at https://fredaccount.stlouisfed.org/apikeys.

See Also

Other configuration: clear_cache(), fred_cache_info(), fred_get_key(), fred_request()

Examples

Run this code
if (FALSE) {
fred_set_key("your_api_key_here")
}

Run the code above in your browser using DataLab