Dataframe Difference Tool

Functions for comparing two data.frames against each other. The core functionality is to provide a detailed breakdown of any differences between two data.frames as well as providing utility functions to help narrow down the source of problems and differences.


CRAN_Status_Badge Travis build status Coverage status

The diffdf package is designed to enable detailed comparison of two data.frames. Whilst many packages exist for informing you if there are differences between data.frames, none provide as much detail on what and where those differences are as diffdf does!

Currently diffdf supports the following:

  • Checking for differences in values
  • Checking for differences in attributes
  • Checking for differences in classes
  • Checking for differences in column names
  • Checking for differences in the number of observations
  • Matching rows by key/id variables
  • Fuzzy comparisons (i.e. treating doubles and integers as the same)
  • Extracting datasets of different rows

For more information on features please consult the vignette and man pages.

Installation

You can install the released version of diffdf from CRAN with:

install.packages("diffdf")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("gowerc/diffdf")

Example

library(diffdf)
iris2 <- iris
for (i in 1:3) iris2[i,i] <- i^2
iris2$new_var <- "hello"
class(iris2$Species) <- "some class"
diffdf(iris, iris2)

News

diffdf 1.0.3

  • No new functionality
  • Update to make package compatible with the changes made to sampling within core R

diffdf 1.0.2

  • No new functionality
  • Update to make package compatible with tibble 2.0.0

diffdf 1.0.1

  • Added package down site
  • Updated description file to include unnamed dependencies in test files
  • Added Travis
  • Added CodeCov

diffdf 1.0.0

  • Initial Release !!

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("diffdf")

1.0.3 by Craig Gower, 2 months ago


https://github.com/gowerc/diffdf


Report a bug at https://github.com/gowerc/diffdf/issues


Browse source code at https://github.com/cran/diffdf


Authors: Craig Gower [cre, aut] , Kieran Martin [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports tibble

Suggests testthat, lubridate, knitr, rmarkdown, purrr, dplyr, stringi, stringr, devtools, covr


See at CRAN