TBE: Time Near Events or Event Run Identification

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

1
2
3
4
5
Counts the number of observations to/from an event.
This is called the time-distance to/from an event.
Alternately, gives the range of an event.

Time Before Event (TBE)

Usage

1
TBE(x, e = T, n = F, r = F, ...)

Arguments

x

xts object

e

T(default). Detect the observation that holds the value of T(TRUE). This can be any value that can be testing on the right hand side of the equals (==) sign. A special option to be an event is NA.

n

F(default). Do not "!" not-the-event. T is useful against NA to detect !is.na(NA). The special case of NA internally is handled !is.na(NA).

r

F(default). Do not generate run range identifiers, instead return(T) the preferred time-distance from the event.

...

dots passed

Value

xts object

Examples

1
2
3
4
5
## Not run: 

# TBE(Time Near Events or Event Run Identification) examples

## End(Not run)

AndreMikulec/econModel documentation built on June 30, 2021, 9:48 a.m.