Skip to contents

Uses `date_var`to create a factor column of isoweeks. Factor levels are all weeks between `date_start` and `date_end`.

Usage

add_cw_iso(data, date_start = NULL, date_end = NULL, date_var = "date_report")

Arguments

data

data.frame, linelist of cases to be aggregated

date_start

A date object or character of format yyyy-mm-dd. Default is NULL which means that missing isoweeks are added until the minimum date of the dataset. This parameter can be used when the dataset should be extended further than the minimum date of the dataset.

date_end

A date object or character of format yyyy-mm-dd. Default is NULL which means that missing isoweeks are added until the maximum date of the dataset. This can be used when the dataset should be extended further than the minimum date of the dataset.

date_var

a character specifying the date variable name used for the aggregation. Default is "date_report".