
Calculate the Number of Days Between Period End and First Release
Source:R/revisions.R
get_days_to_release.Rd
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.
Value
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.
Details
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
.