lvl_number: Return the numeric position of a level in a factor variable

View source: R/lvl_number.R

lvl_numberR Documentation

Return the numeric position of a level in a factor variable

Description

Return the numeric position of a level in a factor variable

Usage

lvl_number(f, lvl)

Arguments

f

A factor variable

lvl

The level for which the underlying value is returned

Value

The numeric position of the level

Examples


lvl_number(iris$Species, "versicolor")

pstraforelli/forcatsmisc documentation built on March 19, 2022, 7:17 a.m.