Skip to contents

Function to create the outcome table TO DO : EDIT XGRID

Usage

make_outcome_table(
  data,
  column_mapping,
  months_subset = 5:9,
  dt_by = "day",
  collapse_to = NULL,
  collapse_is_spatial = FALSE,
  collapse_is_temporal = FALSE,
  grp_level = FALSE,
  keep_unit_outcomes = FALSE
)

Arguments

column_mapping

a named list that indicates relevant columns in data. for the exposure data table, these need to be one of: c('date', "outcome",'factor, 'geo_unit', 'geo_unit_grp')

months_subset

the warm season months for this region, default is Northern Hemisphere's May through September (5 through 9)

dt_by

is it daily data, or weekly or ...

collapse_to

which factors to collapse across

collapse_is_spatial

is collapse a spatial variable

collapse_is_temporal

is collapse a spatial variable

grp_level

whether to summarize to the group level or not (default)

keep_unit_outcomes

if grp_level is true, whether to keep original unit-level outcomes

Examples