Learn R Programming

Rmisc (version 1.5.1)

rsi: Run Start Indices

Description

Find the starting indices of runs in a vector.

Usage

rsi(x)

Arguments

x

a vector of data.

Value

a vector of indices indicating starting points for runs

Examples

Run this code
# NOT RUN {
rsi(c(0,0,0,1,2,2,3,3,3,3,3,4))
# }

Run the code above in your browser using DataLab