slice_diffs {versus} | R Documentation |
Show rows which have differing values in a comparison
Description
Show rows which have differing values in a comparison
Usage
slice_diffs(table, comparison, column = everything())
slice_diffs_both(table_a, table_b, comparison, column = everything())
Arguments
table |
A data frame. One of table_a or table_b used to
create comparison
|
comparison |
The output of compare()
|
column |
<tidy-select >. A row will be in the output of slice functions if
the comparison shows differing values for any columns matching this argument
|
table_a |
The data frametable_a used to create comparison
|
table_b |
The data frametable_b used to create comparison
|
Value
slice_diffs() |
The input table is filtered to only the rows for which
comparison shows differing values for one of the columns in the supplied
column argument
|
slice_diffs_both() |
The output of slice_diffs() for both input
tables with the rows interleaved and a column table indicating which table the row
is from. The output contains only those columns present in both tables.
|
Examples
comp <- compare(example_df_a, example_df_b, by = car)
example_df_a |> slice_diffs(comp, disp)
example_df_a |> slice_diffs(comp, c(disp, mpg))
slice_diffs_both(example_df_a, example_df_b, comp, column = disp)
[Package
versus version 0.2.1
Index]