cumcount: Cumulative count of strings.

View source: R/uniqtag.R

cumcountR Documentation

Cumulative count of strings.

Description

Return an integer vector counting the number of occurrences of each string up to that position in the vector.

Usage

cumcount(xs)

Arguments

xs

a character vector

Value

an integer vector of the cumulative string counts

Examples

cumcount(abbreviate(state.name, 3, strict = TRUE))

uniqtag documentation built on June 10, 2022, 9:06 a.m.