Learn R Programming

MAPCtools (version 0.1.0)

longest_run: Function for finding longest consecutive run of non-missing indices

Description

Function for finding longest consecutive run of non-missing indices

Usage

longest_run(x)

Value

A named list, containing arguments:

from

The first index of the longest run.

to

The last index of the longest run.

step

The stepsize of the longest run.

Arguments

x

A vector of indices for which to find the longest consecutive run of indices