trle {nseq}R Documentation

Run Length Encoding and return result as a data frame

Description

Given a tibble object and a variable y, this function will count the number of occurrence of each element in y in the sequence that they appear, and return this count as a tibble object.

Usage

trle(x)

Arguments

x

a vector.

Value

a data.frame object.

See Also

rle()

Examples

trle(c(8,15,20,0,0,0,0,5,9,12))

[Package nseq version 0.1.1 Index]