factor
R/utils.R
which_level.Rd
Determine the level of a value in a vector of type factor
which_level(x)
vectors of type factor
a vector holding the corresponding level of the input factors
first <- factor(c("J", "O", "S", "H"), LETTERS) which_level(first) #> [1] 10 15 19 8