distance.to.previous.event: x is a vector of 0s and 1s (or FALSE and TRUE)

Description Usage

Description

the function returns a vector of length(x) containing for each index i the distance to the previous entry of a 1, if x[i]=1 we return 0. If the vector starts with 0's, we set the distance for these 0 entries to Inf.

Usage

1

skranz/StratTourn documentation built on May 30, 2019, 2:02 a.m.