slice_unmatched {versus}R Documentation

Get rows in only one table

Description

Get rows in only one table

Usage

slice_unmatched(comparison, table)

slice_unmatched_both(comparison)

Arguments

comparison

The output of compare()

table

One of "a" or "b" indicating which of the tables used to create comparison should be sliced

Value

slice_unmatched()

The table identified by table is filtered to the rows comparison shows as not appearing in the other table

slice_unmatched_both()

The output of slice_unmatched() for both input tables row-stacked with a column table indicating which table the row is from. The output contains only columns present in both tables.

Examples

comp <- compare(example_df_a, example_df_b, by = car)
comp |> slice_unmatched("a")
comp |> slice_unmatched("b")

# slice_unmatched(comp, "a") output is the same as
example_df_a |> dplyr::anti_join(example_df_b, by = comp$by$column)

comp |> slice_unmatched_both()

[Package versus version 0.3.0 Index]