The function returns a vector indicating the length of sequences of identical elements or elements of an identical type in a vector.

1 |

`array_in` |
numeric: input vector |

`funct.seq` |
string or name of a function: name of the function to use. Has to return TRUE for elements belonging to the sequence and FALSE otherwise |

The function returns a vector of the same length as the input vector indicating for each element in array_in how long the sequence of similar elements this value belongs to id. Zero indicates that identical values (or types) in the neighbourhood of the value. This process helps to indicate for example long gaps in timeseries.

numeric vector of the same length as the input vector indicating the gap length for each single element

Jannis v. Buttlar

`seqLongest`

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.