Type: Package
Title: Compare Two Dataframes and Return Adds, Changes, and Deletes
Version: 1.0.0
Author: Shawn Waldroff [aut,cre]
Maintainer: Shawn Waldroff <swaldroff@gmail.com>
Description: Compares two dataframes with a common key and returns the delta records. The package will return three dataframes that contain the added, changed, and deleted records.
License: GPL-3
Encoding: UTF-8
LazyData: true
URL: https://github.com/swaldroff/DFCompare
BugReports: https://github.com/swaldroff/DFCompare/issues
NeedsCompilation: no
Packaged: 2017-05-29 15:43:05 UTC; swaldrof
Repository: CRAN
Date/Publication: 2017-05-29 16:11:28 UTC

Generate Delta Records

Description

Return dataframes for added, changed, and deleted records

Usage

dfCompare(dfOld,dfNew,key)

Arguments

dfOld

Original dataframe

dfNew

New dataframe

key

Key used to join the dataframes

Examples

  a <- c(2, 3, 5)
  b <- c("aa", "bb", "cc")
  c <- c(TRUE, FALSE, TRUE)
  dfOld <- data.frame(a,b,c)

  a <- c(3,4,5)
  b <- c("aaa","dd","cc")
  c <- c(TRUE, FALSE, TRUE)
  dfNew <- data.frame(a,b,c)

  dfDelta <- dfCompare(dfOld,dfNew,"a")