Description Usage Arguments Value Examples
In raw data the same level of a factor variable may be encoded with errors, i.e. misprints. In this case many levels may correspond actually to one true level. This function replaces all mentioned levels by the first one.
1 | one_factor(x, levels)
|
x |
the factor variable with misprints in level names |
levels |
the levels that should be replaced by one level, levels[1] is used as the replacement. |
correctly encoded x
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.