Configures native handling of Date, POSIXct, POSIXlt, difftime,
hms, and ITime columns in synth() and synth_linked(), without
requiring manual conversion to numeric.
Usage
temporal_control(
mode = c("auto", "codec_only", "off"),
chains = NULL,
intervals = NULL,
monotone = "auto",
calendar_features = TRUE,
snap = TRUE
)Arguments
- mode
"auto"(default) converts temporal columns losslessly, automatically detects intra-row chronological chains, longitudinal monotone trajectories, and parent-interval bounds, and adds cyclical calendar context predictors;"codec_only"preserves temporal classes and quanta without automatic chain/interval reparameterisation;"off"disables temporal encoding.- chains
Optional explicit intra-row ordering specification: a named list mapping each downstream column to its predecessor (
list(discharge_date = "admit_date")) or a list of length-2 character vectorsc(anchor, follower).NULL(default) auto-detects empiricala <= bordering.- intervals
Optional explicit parent-interval mapping for child tables: a named list mapping a child temporal column to
c(parent_start, parent_end).NULL(default) auto-detects empirical containment.- monotone
"auto"(default) models non-decreasing longitudinal timestamps as non-negative inter-visit waiting times;TRUEforces this for all time-varying temporal columns;FALSEdisables it; or supply a character vector of column names.- calendar_features
Logical; if
TRUE(default), derives transient day-of-week, month, and (for sub-day classes) diurnal predictors from temporal anchor columns so downstream variables retain calendar patterns.- snap
Logical; if
TRUE(default), snaps synthesised temporal values to each column's empirical resolution quantum (e.g. whole days, hours, or minutes).