diffdfs {diffdfs}R Documentation

Compute the Difference Between Dataframes

Description

Returns a dataframe describing the modifications required to transform old_df into new_df. The dataframes needBugReports: https://github.com/tidyverse/dplyr/issues to have identical columns and column types and share unique index columns.

Usage

diffdfs(new_df, old_df = NA, key_cols = NA, verbose = FALSE)

Arguments

new_df

A dataframe of new data.

old_df

A dataframe of old data. new_df and old_df can (and usually do) have overlapping data.

key_cols

optional vector of column names that constitute a unique table key. If NA, colnames(old_df) will be used.

verbose

logical, default FALSE. Should the processing be chatty?

Value

a dataframe.

Examples

iris$key <- 1:nrow(iris)

old_df <- iris[1:100,]
old_df[75,1] <- 100
new_df <- iris[50:150,]
diffdfs(new_df, old_df, key_cols = "key")

[Package diffdfs version 0.9.0 Index]