Workhorse function for excel_diff_table(). Can be used to diff any pair of dataframes or tibbles. Diff is applied cell by cell, so results will only be meaningful if the shape of the two objects is the same.
Usage
diff_to_table(
df1,
df2,
digits.signif = 6,
proportional.diff = FALSE,
dfnames = NULL,
excelify.col.names = FALSE
)Arguments
- df1
first dataframe or tibble
- df2
second dataframe or tibble
- digits.signif
When comparing numeric values, what decimal do we want to round to before flagging changes? Also used to limit printing of changes? Numeric, defaults to 4.
- proportional.diff
Should flagging of numeric changes be based on absolute differences or the ratio of values, sheet2/sheet? If TRUE, uses
digits.signifto identify proportional threshold.proportional.diff = TRUEanddigits.signif- dfnames
Character vector with names of the two dataframes to use for table title. Optional.
- excelify.col.names
Should columns be identified by excel letter convention? Defaults to FALSE. Set to TRUE when comparing dataframes extracted from excel sheets.