visdat (version 0.5.3)

vis_compare: Visually compare two dataframes and see where they are different.

Description

vis_compare, like the other vis_* families, gives an at-a-glance ggplot of a dataset, but in this case, hones in on visualising two different dataframes of the same dimension, so it takes two dataframes as arguments.

Usage

vis_compare(df1, df2)

Value

ggplot2 object displaying which values in each data frame are present in each other, and which are not.

Arguments

df1

The first dataframe to compare

df2

The second dataframe to compare to the first.

See Also

vis_miss() vis_dat() vis_guess() vis_expect() vis_cor()

Examples

Run this code

# make a new dataset of iris that contains some NA values
aq_diff <- airquality
aq_diff[1:10, 1:2] <- NA
vis_compare(airquality, aq_diff)

Run the code above in your browser using DataCamp Workspace