Convert date column to numeric and calculate its modulus with given timestep.
Source:R/utils.R
date_to_numeric_modulus.Rd
This function processes a date column in a data.table
, converting it to a
numeric representation and then computing the modulus with the provided
timestep.
Arguments
- dt
A data.table.
- date_column
A character string representing the name of the date column in dt.
- timestep
An integer representing the internal timestep.
Value
A modified data.table with two new columns: one for the numeric representation of the date minus the minimum date and another for its modulus with the timestep.
See also
Utility functions
aggregate_rolling_sum()
,
coerce_date()
,
coerce_dt()
,
get_internal_timestep()
,
is.Date()
,
stan_fns_as_string()