
Create day-of-week structural reporting pattern
Source:R/model-module-helpers.R
enw_dayofweek_structural_reporting.RdCreates a structural reporting pattern for cases where reporting only
occurs on specific days of the week (e.g., Wednesday-only reporting).
This is a convenience function that builds on
enw_structural_reporting_metadata().
Arguments
- pobs
A preprocessed observation list from
enw_preprocess_data().- day_of_week
Character vector of weekday names when reporting occurs (e.g.,
"Wednesday"orc("Monday", "Wednesday")).
Value
A data.table with columns:
.group: Group identifierdate: Reference datereport_date: Report datereport: Binary indicator (1 = reporting occurs, 0 = no reporting)
Examples
if (FALSE) { # \dontrun{
pobs <- enw_preprocess_data(obs, max_delay = 30)
# Wednesday-only reporting
enw_dayofweek_structural_reporting(
pobs, day_of_week = "Wednesday"
)
# Multiple reporting days
enw_dayofweek_structural_reporting(
pobs, day_of_week = c("Monday", "Wednesday", "Friday")
)
} # }