EVOLUTION-MANAGER
Edit File: compare_df_cols.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: Generate a comparison of data.frames (or similar objects)...</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 compare_df_cols {janitor}"><tr><td>compare_df_cols {janitor}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate a comparison of data.frames (or similar objects) that indicates if they will successfully bind together by rows.</h2> <h3>Description</h3> <p>Generate a comparison of data.frames (or similar objects) that indicates if they will successfully bind together by rows. </p> <h3>Usage</h3> <pre> compare_df_cols( ..., return = c("all", "match", "mismatch"), bind_method = c("bind_rows", "rbind"), strict_description = FALSE ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>A combination of data.frames, tibbles, and lists of data.frames/tibbles. The values may optionally be named arguments; if named, the output column will be the name; if not named, the output column will be the data.frame name (see examples section).</p> </td></tr> <tr valign="top"><td><code>return</code></td> <td> <p>Should a summary of "all" columns be returned, only return "match"ing columns, or only "mismatch"ing columns?</p> </td></tr> <tr valign="top"><td><code>bind_method</code></td> <td> <p>What method of binding should be used to determine matches? With "bind_rows", columns missing from a data.frame would be considered a match (as in <code>dplyr::bind_rows()</code>; with "rbind", columns missing from a data.frame would be considered a mismatch (as in <code>base::rbind()</code>.</p> </td></tr> <tr valign="top"><td><code>strict_description</code></td> <td> <p>Passed to <code>describe_class</code>. Also, see the Details section.</p> </td></tr> </table> <h3>Details</h3> <p>Due to the returned "column_name" column, no input data.frame may be named "column_name". </p> <p>The <code>strict_description</code> argument is most typically used to understand if factor levels match or are bindable. Factors are typically bindable, but the behavior of what happens when they bind differs based on the binding method ("bind_rows" or "rbind"). Even when <code>strict_description</code> is <code>FALSE</code>, data.frames may still bind because some classes (like factors and characters) can bind even if they appear to differ. </p> <h3>Value</h3> <p>A data.frame with a column named "column_name" with a value named after the input data.frames' column names, and then one column per data.frame (named after the input data.frame). If more than one input has the same column name, the column naming will have suffixes defined by sequential use of <code>base::merge()</code> and may differ from expected naming. The rows within the data.frame-named columns are descriptions of the classes of the data within the columns (generated by <code>describe_class</code>). </p> <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="describe_class.html">describe_class</a>()</code> </p> <h3>Examples</h3> <pre> compare_df_cols(data.frame(A=1), data.frame(B=2)) # user-defined names compare_df_cols(dfA=data.frame(A=1), dfB=data.frame(B=2)) # a combination of list and data.frame input compare_df_cols(listA=list(dfA=data.frame(A=1), dfB=data.frame(B=2)), data.frame(A=3)) </pre> <hr /><div style="text-align: center;">[Package <em>janitor</em> version 2.1.0 <a href="00Index.html">Index</a>]</div> </body></html>