Description Usage Arguments Details Value See Also
The levels of an annotated factor are re-ordered so that the level specified
by ref
is first and the others are moved down. This is useful
for contr.treatment
contrasts which take the first level as the
reference.
1 2 3 4 5 |
x |
An object of class |
ref |
The reference level, typically a character. Contrary to the original behavior, you can also specify a character vector of any length: As many levels as you specified will be re-ordered (standard behavior issued an error). |
Currently, two methods for reordering the levels of an annotated_factor
are implemented:
The annotated_factor,character
-method reorders the levels according to the ordering in a character vector ref
.
The annotated_factor,numeric
-method reorders the levels according to their position within the vector of levels
(as would be returned by levels
).
An annotated factor of the same length as x.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.