relevel.tiny_labelled {tinylabels}R Documentation

Reorder Levels of Labelled Factor

Description

The levels of a factor are re-ordered so that the level specified by ref is first and the others are moved down. This is a copy from relevel in the stats package, but preserves the label attribute and class tiny_labelled.

Usage

## S3 method for class 'tiny_labelled'
relevel(x, ref, ...)

Arguments

x

an unordered factor.

ref

the reference level, typically a string.

...

additional arguments for future methods.


[Package tinylabels version 0.2.4 Index]