EVOLUTION-MANAGER
Edit File: remove_constant.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: Remove constant columns from a data.frame or matrix.</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 remove_constant {janitor}"><tr><td>remove_constant {janitor}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Remove constant columns from a data.frame or matrix.</h2> <h3>Description</h3> <p>Remove constant columns from a data.frame or matrix. </p> <h3>Usage</h3> <pre> remove_constant(dat, na.rm = FALSE, quiet = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>dat</code></td> <td> <p>the input data.frame or matrix.</p> </td></tr> <tr valign="top"><td><code>na.rm</code></td> <td> <p>should <code>NA</code> values be removed when considering whether a column is constant? The default value of <code>FALSE</code> will result in a column not being removed if it's a mix of a single value and <code>NA</code>.</p> </td></tr> <tr valign="top"><td><code>quiet</code></td> <td> <p>Should messages be suppressed (<code>TRUE</code>) or printed (<code>FALSE</code>) indicating the summary of empty columns or rows removed?</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="remove_empty.html">remove_empty()</a></code> for removing empty columns or rows. </p> <p>Other remove functions: <code><a href="remove_empty.html">remove_empty</a>()</code> </p> <h3>Examples</h3> <pre> remove_constant(data.frame(A=1, B=1:3)) # To find the columns that are constant data.frame(A=1, B=1:3) %>% dplyr::select_at(setdiff(names(.), names(remove_constant(.)))) %>% unique() </pre> <hr /><div style="text-align: center;">[Package <em>janitor</em> version 2.1.0 <a href="00Index.html">Index</a>]</div> </body></html>