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

1
seqLongest(array_in, na.rm = FALSE)

Arguments

array_in

logical vector: input vector

na.rm

logical: if TRUE, NAs are tretaed as FALSE

Author(s)

Jannis v. Buttlar