order_as_per: Order levels in factor as per some example string

Description Usage Arguments Value

View source: R/utils.R

Description

This is the way fct_relevel should work. The warning is silly.

Usage

1
order_as_per(fctr, order_chars)

Arguments

fctr

a factor with levels

order_chars

a character vector with strings matching levels of fctr.

Value

a version of 'fctr' with levels ordered as per 'order_chars'


johnfrye/fryeR documentation built on Dec. 28, 2021, 6:20 p.m.