View source: R/fnsComparison.R
compare_df | R Documentation |
Do a git style comparison between two data frames of similar columnar structure
compare_df( df_new, df_old, group_col, exclude = NULL, tolerance = 0, tolerance_type = "ratio", stop_on_error = TRUE, keep_unchanged_rows = FALSE, keep_unchanged_cols = TRUE, change_markers = c("+", "-", "="), round_output_to = 3 )
df_new |
The data frame for which any changes will be shown as an addition (green) |
df_old |
The data frame for which any changes will be shown as a removal (red) |
group_col |
A character vector of a string of character vector showing the columns by which to group_by. |
exclude |
The columns which should be excluded from the comparison |
tolerance |
The amount in fraction to which changes are ignored while showing the visual representation. By default, the value is 0 and any change in the value of variables is shown off. Doesn't apply to categorical variables. |
tolerance_type |
Defaults to 'ratio'. The type of comparison for numeric values, can be 'ratio' or 'difference' |
stop_on_error |
Whether to stop on acceptable errors on not |
keep_unchanged_rows |
whether to preserve unchanged values or not. Defaults to |
keep_unchanged_cols |
whether to preserve unchanged values or not. Defaults to |
change_markers |
what the different change_type nomenclature should be eg: c("new", "old", "unchanged"). |
round_output_to |
Number of digits to round the output to. Defaults to 3. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.