vectorEnum: Enumerating vectors

Description Usage Arguments Value Author(s) Examples

View source: R/vectorEnum.R

Description

Enumarates components of a vector in order to make each component unique. Useful for cases where duplicates of vector components must be avoided.

Usage

1
vectorEnum(x, sep = ".")

Arguments

x

a vector with possibly duplicated components

sep

a character indicating how the enumeration and original vector components should be separated. Defaults to "."

Value

a vector in the same order and dimension as 'x' with each component uniquely enumerated

Author(s)

Atreya Shankar

Examples

1
2
3
4
5
6
## Not run: 

x <- c(rep("foo", 10), rep("bat", 25), rep("baz", 10), rep("foo", 10))
test <- demystas::vectorEnum(x)

## End(Not run)

pik-piam/demystas documentation built on Oct. 26, 2019, 12:15 a.m.