Learn R Programming

warehouseTools (version 0.1.2)

count_by_sequence: 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)

Value

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

Arguments

v

A vector of values to be analyzed.