cumcount | R Documentation |
Return an integer vector counting the number of occurrences of each string up to that position in the vector.
cumcount(xs)
xs |
a character vector |
an integer vector of the cumulative string counts
cumcount(abbreviate(state.name, 3, strict = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.