eventlist: Eventlist

Description Usage Arguments Details Value Examples

View source: R/eventClass.R

Description

An eventlist is a data.frame with the necessary parameters to define an event as columns and specific events as rows. Event time and value can be passed as parameters, which can also be estimated.

Usage

1
2
3
eventlist(var = NULL, time = NULL, value = NULL, method = NULL)

addEvent(event, var, time = 0, value = 0, method = "replace", ...)

Arguments

var

Character, the state to which the event is applied

time

Character or Numeric, the time at which the event happens

value

Character or Numeric, the value of the event

method

Character, options are "replace", "add" or "multiply"

event

object of class eventlist

...

not used

Details

The function addEvent is pipe-friendly

Value

data.frame with class eventlist

Examples

1
2
3
4
eventlist(var = "A", time = "5", value = 1, method = "add")

events <- addEvent(NULL, var = "A", time = "5", value = 1, method = "add")
events <- addEvent(events, var = "A", time = "10", value = 1, method = "add")

dMod documentation built on Jan. 27, 2021, 1:07 a.m.