enumerate: Give numeric identifiers to a vector of values

View source: R/transforms_text.R

enumerateR Documentation

Give numeric identifiers to a vector of values

Description

Give numeric identifiers to a vector of values

Usage

enumerate(vals)

Arguments

vals

The values to enumerate

Details

Given a vector of some type, assigns a number to each unique value and returns the vector of the values' positions in the unique values. The unique values are tabulated in the order of appearance.

Value

the enumeration of vals

Examples

enumerate(letters[1:10])
enumerate(rep(letters[1:3], times=5))

qPharmetra/PMDatR documentation built on April 7, 2024, 5:42 p.m.