EVOLUTION-MANAGER
Edit File: fct_expand.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Add additional levels to a factor</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for fct_expand {forcats}"><tr><td>fct_expand {forcats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add additional levels to a factor</h2> <h3>Description</h3> <p>Add additional levels to a factor </p> <h3>Usage</h3> <pre> fct_expand(f, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>f</code></td> <td> <p>A factor (or character vector).</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional levels to add to the factor. Levels that already exist will be silently ignored.</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="fct_drop.html">fct_drop()</a></code> to drop unused factor levels. </p> <h3>Examples</h3> <pre> f <- factor(sample(letters[1:3], 20, replace = TRUE)) f fct_expand(f, "d", "e", "f") fct_expand(f, letters[1:6]) </pre> <hr /><div style="text-align: center;">[Package <em>forcats</em> version 0.5.0 <a href="00Index.html">Index</a>]</div> </body></html>