spells: Running spell length

View source: R/spells.R

spellsR Documentation

Running spell length

Description

Calculates the running number of consecutive non-zero values of a vector

Usage

spells(x, initial_value = NA_real_)

Arguments

x

A numeric vector

initial_value

The initial value of the spell length

Value

a vector of length x of the running number of consecutive non-zero values of x


IDEMSInternational/RInstatClimatic documentation built on June 30, 2023, 7:40 p.m.