cl: Define a vector with factor levels in the same order as...

View source: R/cl.R

clR Documentation

Define a vector with factor levels in the same order as occurring in the vector.

Description

This is a shortcut for creating factors with levels as the order of appearance of the specified levels.

Usage

cl(...)

Arguments

...

unique elements or vectors with unique elements

Value

A factor (vector)

See Also

cc

Examples

factor("b","a")
cl("b","a")
x <- c("b","a")
factor(x)
cl(x)

NMdata documentation built on Nov. 11, 2023, 5:07 p.m.