Learn R Programming

diffobj - Diffs for R Objects

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

See the introductory vignette for details.

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

  • tools::Rdiff.
  • Daff diff, patch and merge for data.frames.
  • GNU diff.
  • waldo, which internally uses diffobj for diffs but takes a more hands-on approach to detailing object differences.

Acknowledgements

Copy Link

Version

Install

install.packages('diffobj')

Monthly Downloads

660,662

Version

0.3.9

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Brodie Gaslam

Last Published

September 11th, 2026

Functions in diffobj (0.3.9)

console_lines

Attempt to Compute Console Height in Text Lines
diffCsv

Diff CSV Files
diffDeparse

Diff Deparsed Objects
diffObj

Diff Objects
diffChr

Diff Character Vectors Element By Element
diffFile

Diff Files
any,Diff-method

Determine if Diff Object Has Differences
as.character,DiffSummary-method

Generate Character Representation of DiffSummary Object
dimnames,PaletteOfStyles-method

Retrieve Dimnames for PaletteOfStyles Objects
diffPrint

Diff printed Objects
diffStr

Diff Object Structures
diffobj_set_def_opts

Set All diffobj Options to Defaults
pager_is_less

Check Whether System Has less as Pager
par_frame

Get Parent Frame of S4 Call Stack
diffobj_s4method_doc

Dummy Doc File for S4 Methods with Existing Generics
diffobj-package

Diffs for R Objects
diff_myers

Diff two character vectors
view_or_browse

Invoke IDE Viewer If Available, browseURL If Not
nchar_html

Count Text Characters in HTML
make_blocking

Create a Blocking Version of a Function
[,Diff,numeric,missing,missing-method

Subsetting Methods for Diff Objects
summary,MyersMbaSes-method

Summary Method for Shortest Edit Path
ses

Shortest Edit Script
show,DiffSummary-method

Display DiffSummary Objects
finalizeHtml

Finalizing Methods for HTML Output
auto_context

Configure Automatic Context Calculation
gdo

Shorthand Function for Accessing diffobj Options
show,Style-method

Show Method for Style Objects
show,PaletteOfStyles-method

Display a PaletteOfStyles
summary,PaletteOfStyles-method

Display a Summarized Version of a PaletteOfStyles
as.character,MyersMbaSes-method

Generate a character representation of Shortest Edit Sequence
webfiles

Return Location of Default HTML Support Files
trim

Methods to Remove Unsemantic Text Prior to Diff
tag_f

Make Functions That Wrap Text in HTML Tags
summary,Diff-method

Summary Method for Diff Objects
guides

Generic Methods to Implement Flexible Guide Line Computations
has_Rdiff

Attempt to Detect Whether diff Utility is Available
strip_hz_control

Replace Horizontal Spacing Control Characters
StyleText-class

Character Tokens Used in Diffs
PaletteOfStyles-class

Class for Tracking Default Styles by Style Type
AlignThreshold-class

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

Diff Result Object
Pager

Objects for Specifying Pager Settings
Style-class

Customize Appearance of Diff
StyleSummary-class

Styling Information for Summaries
[<-,PaletteOfStyles-method

Extract/Replace a Style Class or Object from PaletteOfStyles
StyleFuns-class

Functions Used for Styling Diff Components
Rdiff_chr

Run Rdiff Directly on R Objects