Learn R Programming

NMdata (version 0.2.3)

cl: 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(...)

Value

A factor (vector)

Arguments

...

unique elements or vectors with unique elements

See Also

cc

Examples

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

Run the code above in your browser using DataLab