Learn R Programming

JBTools (version 0.7.2.9)

seqLongest: find longest sequence of TRUEs

Description

The function determines the first position and the length of the longest uninterupted series of TRUEs in a logical sequence. This for example can be used to find gapless positions in a series

Usage

seqLongest(array_in, na.rm = FALSE)

Arguments

array_in
logical vector: input vector
na.rm
logical: if TRUE, NAs are tretaed as FALSE