Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fredr_category_related

Get the related categories for a FRED category.


Description

Get the related categories for a FRED category.

Usage

fredr_category_related(
  category_id,
  ...,
  realtime_start = NULL,
  realtime_end = NULL
)

Arguments

category_id

An integer ID for the category. Default is 0 for the root category. Required parameter.

...

These dots only exist for future extensions and should be empty.

realtime_start

A Date indicating the start of the real-time period. Defaults to today's date. For more information, see Real-Time Periods.

realtime_end

A Date indicating the end of the real-time period. Defaults to today's date. For more information, see Real-Time Periods.

Details

From the FRED API documentation: "A related category is a one-way relation between 2 categories that is not part of a parent-child category hierarchy. Most categories do not have related categories."

Value

A tibble object containing the name and parent ID for categories related to the category indicated by category_id.

API Documentation

See Also

Examples

if (fredr_has_key()) {
# Categories related to the "Employment Cost Index" category
fredr_category_related(category_id = 4L)
}

fredr

An R Client for the 'FRED' API

v2.1.0
MIT + file LICENSE
Authors
Sam Boysel [aut, cre], Davis Vaughan [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.