fset_level: Set Levels of Factor

Description Usage Arguments Value See Also Examples

Description

sets levels to the order in which they appear in the data, i.e. set the levels “as is”

Usage

1

Arguments

x

factor

Value

Return a factor with its level identical to the order of the data

See Also

base::factor

Examples

1
2
fset_level(factor(c("banana","coconut","apple")))
this will return a sorted level: apple, babana, coconut in the alphabetical order.

STAT545-UBC-students/hw07-janehuang1647 documentation built on May 30, 2019, 12:50 p.m.