cumcount {uniqtag}R 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))

[Package uniqtag version 1.0.1 Index]