| get_latest_release | R Documentation |
Filters the input dataset to return the most recent release (or vintage) for each time period.
get_latest_release(df)
df |
A data frame containing data vintages. The data frame must include
the columns |
For each time period, the function identifies the release with the latest
publication date (pub_date) and adds a column release that labels the
release as release_N, where N is the release index (zero indexed).
A filtered data frame containing only the most recent release(s).
The resulting data frame is assigned the class tbl_release to indicate
its structure.
Other revision utilities:
get_days_to_release(),
get_first_release(),
get_fixed_release(),
get_nth_release(),
get_releases_by_date(),
get_revisions()
# Example data
df <- dplyr::filter(reviser::gdp, id == "US")
# Get the latest release for each time period
latest_release <- get_latest_release(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.