Get a FRED category
fredr_category(category_id)
An integer ID for the category.
A tibble
object containing the name and parent ID for the category
indicated by category_id
.
if (fredr_has_key()) {
# Root category
fredr_category(category_id = 0L)
# "Production & Business Activity" category
fredr_category(category_id = 1L)
}
#> # A tibble: 1 × 3
#> id name parent_id
#> <int> <chr> <int>
#> 1 1 Production & Business Activity 0