R/fredr_series_release.R

Defines functions fredr_series_release

Documented in fredr_series_release

#' Get the release for a FRED series
#'
#' Given a series ID, return information on a series as a `tibble` object.
#'
#' @inheritParams fredr_series_observations
#'
#' @return A `tibble` object with information on the release for the series specified
#' by the `series_id` parameter.  Data include release ID, real-time periods, release name,
#' and links to press releases, if available.
#'
#' @section API Documentation:
#'
#' [fred/series/release](https://research.stlouisfed.org/docs/api/fred/series_release.html)
#'
#' @seealso [fredr_series_observations()], [fredr_series_search_text()],
#' [fredr_series_search_id()], [fredr_series_search_tags()],
#' [fredr_series_search_related_tags()], [fredr_series()],
#' [fredr_series_categories()], [fredr_series_tags()], [fredr_series_updates()],
#' [fredr_series_vintagedates()].
#'
#' @examples
#' \donttest{
#' # Get release information for the "UNRATE" series
#' fredr_series_release(series_id = "UNRATE")
#' }
#' @export
fredr_series_release <- function(series_id = NULL,
                                 realtime_start = NULL,
                                 realtime_end = NULL) {

  validate_series_id(series_id)

  user_args <- capture_args(
    series_id,
    realtime_start,
    realtime_end
  )

  fredr_args <- list(
    endpoint = "series/release"
  )

  do.call(fredr_request, c(fredr_args, user_args))

}

Try the fredr package in your browser

Any scripts or data that you put into this service are public.

fredr documentation built on May 2, 2019, 7:29 a.m.