get_streaks: Computes lengths of streaks for a binary sequence

get_streaksR Documentation

Computes lengths of streaks for a binary sequence

Description

Computes the lengths of all streaks of 1's in a vector of binary observations (0's and 1's)

Usage

get_streaks(x)

Arguments

x

vector of 0's and 1's

Value

vector of lengths of streaks

Author(s)

Jim Albert

Examples

y <- c(0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0)
get_streaks(y)

bayesball/BayesTestStreak documentation built on April 28, 2024, 6:28 a.m.