set_factor: Set a factor in a given order

Description Usage Arguments Value Examples

View source: R/set_factor.R

Description

sets levels to the order in which they appear in the data, i.e. set the levels <e2><80><9c>as is<e2><80><9d>

Usage

1

Arguments

x

a factor you want to set

Value

Return levels to the order in which they appear in the data, An error is raised if the input is not a factor

Examples

1
set_factor(factor(c("b", "c", "a"))) # Levels: b c a

STAT545-UBC-students/hw07-Sukeysun documentation built on May 24, 2019, 7:53 a.m.