rename_factor: Rename a factor.

Description Usage Arguments Value See Also

View source: R/forcats-like.R

Description

Renames the levels of a factor.

Usage

1

Arguments

.f

A factor or vector (if .f is not yet a factor, it is made one)

...

Dictionaryish arguments, named by old level, value is new level ("old level" = "new level"). You can pass single named arguments, or named vectors or named lists, which will be spliced.

reorder

Logical: If True, the levels will additionally be reordered in the order of first appearance in the arguments

Value

A renamed and reordered factor

See Also

rename_reorder_factor, order_factor_by, forcats::fct_recode, forcats::fct_relevel


tidytidbits documentation built on March 8, 2021, 5:07 p.m.