ts_event_count: Count and ennumerate events in a dummy series.

Description Usage Arguments Value Examples

View source: R/ts_event_count.R

Description

Given a numeric vector with dummies for events, enumerate the events. Return a vector of length(x) filled with NAs, and a counter, where x equals 1.

Usage

1

Arguments

x

A numeric vector of 0s and 1s.

Value

A numeric vector containing NAs, and the count of the event corresponding to the dummy series.

Examples

1
ts_event_count(c(0, 0, 1, 1, 0, 1, 0))

thorepet/thoremisc documentation built on Oct. 8, 2021, 7:48 a.m.