Skip to contents

Creates 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().

Usage

enw_dayofweek_structural_reporting(pobs, day_of_week)

Arguments

pobs

A preprocessed observation list from enw_preprocess_data().

day_of_week

Character vector of weekday names when reporting occurs (e.g., "Wednesday" or c("Monday", "Wednesday")).

Value

A data.table with columns:

  • .group: Group identifier

  • date: Reference date

  • report_date: Report date

  • report: 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")
)
} # }