getruns: Calculate lengths of all runs in availability.

View source: R/availutils.R

getrunsR Documentation

Calculate lengths of all runs in availability.

Description

Calculates lengths of the runs of 0s and 1s in a vector.

Usage

getruns(avail)

Arguments

avail

is a vecto of binary data (0s and 1s).

Details

Returns a list with components run1 being a vector with the lengths of all runs of 1s, in order, and run0 being a vector with the lengths of all runs of 0s, in order.


david-borchers/hmltm documentation built on Oct. 29, 2023, 9:07 p.m.