count_by_sequence: Count Sequential Occurrences in a Vector

View source: R/helpers.R

count_by_sequenceR Documentation

Count Sequential Occurrences in a Vector

Description

This internal function counts the number of sequential occurrences of values in a vector and returns the results as a data frame.

Usage

count_by_sequence(v)

Arguments

v

A vector of values to be analyzed.

Value

A data frame with two columns: 'id' representing the unique values and 'count' representing the number of consecutive occurrences of each value.


warehouseTools documentation built on April 3, 2025, 10:29 p.m.