date_to_numeric_modulus: Convert date column to numeric and calculate its modulus with...

date_to_numeric_modulusR Documentation

Convert date column to numeric and calculate its modulus with given timestep.

Description

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.

Usage

date_to_numeric_modulus(dt, date_column, 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()


seabbs/epinowcast documentation built on Aug. 28, 2024, 12:31 p.m.