consecutive_id: Generate a unique id for consecutive values

View source: R/consecutive_id.R

consecutive_idR Documentation

Generate a unique id for consecutive values

Description

Generate a unique id for runs of consecutive values

Usage

consecutive_id(...)

Arguments

...

Vectors of values

Examples

x <- c(1, 1, 2, 2, 1, 1)
consecutive_id(x)

tidytable documentation built on Sept. 11, 2024, 8:05 p.m.