table_to_events: Generates list of Events from table.

Description Usage Arguments Value Examples

Description

Generates list of Events from table.

Usage

1
table_to_events(regressors_table)

Arguments

regressors_table

Data frame formatted as follows with all fields as strings. event start end time_function christmas 2014-12-25 2014-12-25 none christmas 2015-12-25 2015-12-25 none promotion 2015-11-27 2015-11-30 inverse

Value

Returns a list of Event reference classes. Grouping by event name.

Examples

1
2
3
4
5
6
7
regs_table <- data.frame(event=c("christmas", "christmas", "promotion"),
                         start=c("2014-12-25", "2015-12-25", "2015-11-27"),
                         end=c("2014-12-25", "2015-12-25", "2015-11-30"),
                         time_function= c("none","none","inverse"),
                         stringsAsFactors=FALSE)

table_to_events(regs_table)

wjhrdy/foregen documentation built on May 4, 2019, 7:33 a.m.