set_level: Set levels of a factor to the order appeared in data

Description Usage Arguments Value Examples

Description

Set levels of a factor to the order appeared in data

Usage

1

Arguments

x

a vector or a factor

Value

a factor with levels in the order appeared in x. This function will only return unique x levels,

Examples

1
set_level(c("pear","apple","banana","banana","apple"))

xinyaofan/foofactors documentation built on May 29, 2019, 2:29 p.m.