Usage
linelist2sts(linelist,dateCol,
aggregate.by=c("1 day", "1 week", "7 day", "1 week",
"1 month", "3 month", "1 year"),
dRange=NULL,
epochInPeriodStr=switch(aggregate.by, "1 day"="1",
"1 week"="%u", "1 month"="%d","3 month"="%q","1 year"="%j"),
startYearFormat=switch(aggregate.by,"1 day"="%Y",
"7 day"="%G", "1 week"="%G","1 month"="%Y","3 month"="%Y","1 year"="%Y"),
startEpochFormat=switch(aggregate.by,"1 day"="%j",
"7 day"="%V", "1 week"="%V", "1 month"="%m", "3 month"="%Q", "1 year"="1")
)Arguments
linelist
A data.frame containing the line list of cases.
dateCol
A character string stating the column name in
linelist which contains the event occurrence information (as a
vector of Dates) which are to be temporally aggregated.
aggregate.by
Temporal aggregation level given as a string, see
the by variable of the seq.Date function for
further details. dRange
A vector containing the minimum and maximum date
for doing the aggregation. If not specified these dates are
extracted automatically by taking range(D[,dateCol]) and
adjust these according to aggregate.by (e.g. always
epochInPeriodStr
strptime compatible format string to use for
determining how a date is placed within the epoch. This is, e.g.,
used to move the dRange epochs to the beginning of the
period. Example: In case of weekly aggregation the
startYearFormat
strptime compatible format string to use for
determining how the start entry of the sts object is
generated. Usually the provided defaults are sufficient.
startEpochFormat
strptime compatible format string to use for
determining how the start entry of the sts object is
generated. Usually the provided defaults are sufficient.