linelist2xts: Simple Date based aggregation based on the data.table...

Description Usage Arguments Details Value

View source: R/getIncidence.R

Description

The function allows to split by a single factor variable. More factors as well as factor interactions are currently not supported.

Usage

1
linelist2xts(formula, dateProjFun = identity, dRange = NULL, data)

Arguments

formula

Formula of type LHSVar ~ RHSVar, where LHSVar is a column of class Dates and RHSVar is a column containing a factor variable

dateProjFun

Date projection function, i.e. how are dates projected down (i.e. monday, start of month, etc.). Result must be a Date again!

dRange

Vector of length two giving the start and stop dates, the actual range will be range(dateProjFun(dRange)).

data

data.frame containing the LHSVar RHSVar variables.

Details

The formula has to be of the type LHSVar ~ RHSVar, where LHSVar is a column of class Dates and RHSVar is a column containing a factor variable. Currently, the formula is unrwapped manually. A better solution is to use formula syntax. Note: A multivariate time series for all levels of RHSVar (including NA if present) is generated.

Value

xts time series


Hackout2/incidence documentation built on May 6, 2019, 9:47 p.m.