| get_first_release | R Documentation |
Filters the input dataset to return the earliest release (or vintage) for each time period.
get_first_release(df, diagonal = FALSE)
df |
A data frame containing data vintages. The data frame must
include the columns |
diagonal |
Logical. If |
For each time period, the function identifies the release with the earliest
publication date (pub_date). A new column release is added and labels
all rows in the resulting data frame as release_0. If diagonal is set
to TRUE, the function only returns the real first releases. That is
historic values for which no vintages exist are not returned.
A filtered data frame containing only the first release(s).
The resulting data frame is assigned the class tbl_release to
indicate its structure.
Other revision utilities:
get_days_to_release(),
get_fixed_release(),
get_latest_release(),
get_nth_release(),
get_releases_by_date(),
get_revisions()
# Example data
df <- dplyr::filter(reviser::gdp, id == "US")
# Get the first release for each time period
first_release <- get_first_release(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.