Skip to contents

Creates a comparison view of the data which lists out every value in df1 directly next to its corresponding value in df2 in its own row. Each row in this view is uniquely identified by id columns in df1 and df2 along with a column of column names from df1 and df2. This view also includes a record from column which described whether the records in the row was from df1, df2, or df1 and df2. It also includes a Value Changed column which will be marked as "Y" in the discrepancy change for a record that was an addition, deletion, or change, marked as "N" for matched records, or marked as "UNK" for records that could not be compared between df1 and df1.

Usage

get_pivoted_view(top_bottom_view, top_bottom_view_change_indices, id_cols)

Arguments

top_bottom_view

a data frame of comparison data where each row in df1 is displayed directly above its df2 counterpart

top_bottom_view_change_indices

the top_bottom output of the get_changed_row_indices_by_column() which provides the column and rows in top_bottom_view that have changed between df1 and df2

id_cols

a character vector of id columns output from compare_cols()

Value

a data frame