EVOLUTION-MANAGER
Edit File: describe_class.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: Describe the class(es) of an object</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 describe_class {janitor}"><tr><td>describe_class {janitor}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Describe the class(es) of an object</h2> <h3>Description</h3> <p>Describe the class(es) of an object </p> <h3>Usage</h3> <pre> describe_class(x, strict_description = TRUE) ## S3 method for class 'factor' describe_class(x, strict_description = TRUE) ## Default S3 method: describe_class(x, strict_description = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>The object to describe</p> </td></tr> <tr valign="top"><td><code>strict_description</code></td> <td> <p>Should differing factor levels be treated as differences for the purposes of identifying mismatches? <code>strict_description = `TRUE`</code> is stricter and factors with different levels will be treated as different classes. <code>FALSE</code> is more lenient: for class comparison purposes, the variable is just a "factor".</p> </td></tr> </table> <h3>Details</h3> <p>For package developers, an S3 generic method can be written for <code>describe_class()</code> for custom classes that may need more definition than the default method. This function is called by <code>compare_df_cols</code>. </p> <h3>Value</h3> <p>A character scalar describing the class(es) of an object where if the scalar will match, columns in a data.frame (or similar object) should bind together without issue. </p> <h3>Methods (by class)</h3> <ul> <li> <p><code>factor</code>: Describe factors with their levels and if they are ordered. </p> </li> <li> <p><code>default</code>: List all classes of an object. </p> </li></ul> <h3>See Also</h3> <p>Other Data frame type comparison: <code><a href="compare_df_cols_same.html">compare_df_cols_same</a>()</code>, <code><a href="compare_df_cols.html">compare_df_cols</a>()</code> </p> <h3>Examples</h3> <pre> describe_class(1) describe_class(factor("A")) describe_class(ordered(c("A", "B"))) describe_class(ordered(c("A", "B")), strict_description=FALSE) </pre> <hr /><div style="text-align: center;">[Package <em>janitor</em> version 2.1.0 <a href="00Index.html">Index</a>]</div> </body></html>