| get_days_to_release | R Documentation |
Computes the number of days between the publication date (pub_date) of a
release and the time period (time) end date for each record in
the dataset.
get_days_to_release(df)
df |
A data frame containing data vintages. The data frame must
include the columns |
The function calculates the difference between pub_date and time
for each row in the dataset. The result is expressed as the number of days
between the release publication date and the corresponding time period end.
If the dataset is in wide format, it will first be transformed into long
format using vintages_long.
A data frame with an additional column days_to_release
representing the number of days between the publication date (pub_date)
and the time period (time) for each release.
Other revision utilities:
get_first_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")
# Calculate days to release
df_with_days <- get_days_to_release(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.