Learn R Programming

⚠️There's a newer version (0.3.6) of this package.Take me there.

diffobj - Diffs for R Objects

Generate a colorized diff of two R objects for an intuitive visualization of their differences.

See vignettes for details, and for comparisons with standard comparison functions.

Output

If your terminal supports formatting through ANSI escape sequences, diffobj will output colored diffs to the terminal. Otherwise, output will be colored with HTML/CSS and sent to the IDE viewport or to your browser. diffobj comes with several built-in color schemes that can be further customized. Some examples:

Installation

This package is available on CRAN.

install.packages("diffobj")
browseVignettes("diffobj")

Related Software

Acknowledgements

  • R Core for developing and maintaining such a wonderful language.
  • CRAN maintainers, for patiently shepherding packages onto CRAN and maintaining the repository, and Uwe Ligges in particular for maintaining Winbuilder.
  • Eugene W. Myers for the Diff algorithm.
  • Michael B Allen for the original C implementation of the Myers' Diff algorithm.
  • Jim Hester because covr rocks.
  • Dirk Eddelbuettel and Carl Boettiger for the rocker project, and Gábor Csárdi and the R-consortium for Rhub, without which testing bugs on R-devel and other platforms would be a nightmare.
  • Tomas Kalibera for rchk and rcnst to help detect errors in compiled code.
  • Hadley Wickham for devtools and roxygen2.
  • Yihui Xie for knitr and J.J. Allaire etal for rmarkdown, and by extension John MacFarlane for pandoc.

Copy Link

Version

Install

install.packages('diffobj')

Monthly Downloads

365,914

Version

0.1.7

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Brodie Gaslam

Last Published

November 9th, 2017

Functions in diffobj (0.1.7)

ses

Shortest Edit Script
guides

Generic Methods to Implement Flexible Guide Line Computations
show,DiffSummary-method

Display DiffSummary Objects
strip_hz_control

Replace Horizontal Spacing Control Characters
summary,MyersMbaSes-method

Summary Method for Shortest Edit Path
summary,Diff-method

Summary Method for Diff Objects
summary,PaletteOfStyles-method

Display a Summarized Version of a PaletteOfStyles
StyleSummary-class

Styling Information for Summaries
StyleText-class

Character Tokens Used in Diffs
console_lines

Attempt to Compute Console Height in Text Lines
diffChr

Diff Character Vectors Element By Element
diff_myers

Diff two character vectors
diffobj-package

Diffs for R Objects
show,PaletteOfStyles-method

Display a PaletteOfStyles
show,Style-method

Show Method for Style Objects
Style-class

Customize Appearance of Diff
StyleFuns-class

Functions Used for Styling Diff Components
diffCsv

Diff CSV Files
diffDeparse

Diff Deparsed Objects
dimnames,PaletteOfStyles-method

Retrieve Dimnames for PaletteOfStyles Objects
[,Diff,numeric,missing,missing-method

Subsetting Methods for Diff Objects
make_blocking

Create a Blocking Version of a Function
nchar_html

Count Text Characters in HTML
tag_f

Make Functions That Wrap Text in HTML Tags
trim

Methods to Remove Unsemantic Text Prior to Diff
PaletteOfStyles-class

Class for Tracking Default Styles by Style Type
diffPrint

Diff printed Objects
diffStr

Diff Object Structures
pager_is_less

Check Whether System Has less as Pager
par_frame

Get Parent Frame of S4 Call Stack
AlignThreshold-class

Controls How Lines Within a Diff Hunk Are Aligned
Diff-class

Diff Result Object
diffFile

Diff Files
diffObj

Diff Objects
Rdiff_chr

Run Rdiff Directly on R Objects
as.character,MyersMbaSes-method

Generate a character representation of Shortest Edit Sequence
auto_context

Configure Automatic Context Calculation
finalizeHtml

Finalizing Methods for HTML Output
gdo

Shorthand Function for Accessing diffobj Options
has_Rdiff

Attempt to Detect Whether diff Utility is Available
any,Diff-method

Determine if Diff Object Has Differences
view_or_browse

Invoke IDE Viewer If Available, browseURL If Not
webfiles

Return Location of Default HTML Support Files
as.character,DiffSummary-method

Generate Character Representation of DiffSummary Object
diffobj_s4method_doc

Dummy Doc File for S4 Methods with Existing Generics
diffobj_set_def_opts

Set All diffobj Options to Defaults
[<-,PaletteOfStyles-method

Extract/Replace a Style Class or Object from PaletteOfStyles
Pager

Objects for Specifying Pager Settings