rhrBaseIntervalSubset: Interval Check

Description Usage Arguments Value Examples

Description

Checks if consecutive observations are separated by an interval or not. If int is used up, than the next observation is used.

Usage

1

Arguments

ts

Numeric vector, the time stamps in seconds.

int

Numeric scalar, the minimum time in seconds that two observations need to be separated.

Value

A logcial vector of length length(ts), indicating if a given observation is seperated from the last chosen one by int.

Examples

1
2
3
4
5
6
7
## sequence of 10 seconds
x <- seq(0, 3600, by = 60)
x[rhrBaseIntervalSubset(x, 600)]

## make the sequence irregular
x <- sort(sample(x, 40))
x[rhrBaseIntervalSubset(x, 600)]

jmsigner/rhrBase documentation built on May 19, 2019, 2:57 p.m.