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

389,521

Version

0.3.5

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

October 5th, 2021

Functions in diffobj (0.3.5)

[<-,PaletteOfStyles-method

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

Customize Appearance of Diff
StyleFuns-class

Functions Used for Styling Diff Components
StyleText-class

Character Tokens Used in Diffs
StyleSummary-class

Styling Information for Summaries
auto_context

Configure Automatic Context Calculation
as.character,MyersMbaSes-method

Generate a character representation of Shortest Edit Sequence
Pager

Objects for Specifying Pager Settings
diffFile

Diff Files
diffObj

Diff Objects
finalizeHtml

Finalizing Methods for HTML Output
console_lines

Attempt to Compute Console Height in Text Lines
diffCsv

Diff CSV Files
diffobj_s4method_doc

Dummy Doc File for S4 Methods with Existing Generics
diffDeparse

Diff Deparsed Objects
any,Diff-method

Determine if Diff Object Has Differences
[,Diff,numeric,missing,missing-method

Subsetting Methods for Diff Objects
has_Rdiff

Attempt to Detect Whether diff Utility is Available
dimnames,PaletteOfStyles-method

Retrieve Dimnames for PaletteOfStyles Objects
guides

Generic Methods to Implement Flexible Guide Line Computations
diffChr

Diff Character Vectors Element By Element
show,PaletteOfStyles-method

Display a PaletteOfStyles
show,Style-method

Show Method for Style Objects
as.character,DiffSummary-method

Generate Character Representation of DiffSummary Object
diff_myers

Diff two character vectors
strip_hz_control

Replace Horizontal Spacing Control Characters
make_blocking

Create a Blocking Version of a Function
diffobj_set_def_opts

Set All diffobj Options to Defaults
gdo

Shorthand Function for Accessing diffobj Options
summary,Diff-method

Summary Method for Diff Objects
pager_is_less

Check Whether System Has less as Pager
summary,MyersMbaSes-method

Summary Method for Shortest Edit Path
par_frame

Get Parent Frame of S4 Call Stack
diffobj-package

Diffs for R Objects
summary,PaletteOfStyles-method

Display a Summarized Version of a PaletteOfStyles
show,DiffSummary-method

Display DiffSummary Objects
diffStr

Diff Object Structures
ses

Shortest Edit Script
tag_f

Make Functions That Wrap Text in HTML Tags
diffPrint

Diff printed Objects
nchar_html

Count Text Characters in HTML
webfiles

Return Location of Default HTML Support Files
view_or_browse

Invoke IDE Viewer If Available, browseURL If Not
trim

Methods to Remove Unsemantic Text Prior to Diff
PaletteOfStyles-class

Class for Tracking Default Styles by Style Type
AlignThreshold-class

Controls How Lines Within a Diff Hunk Are Aligned
Rdiff_chr

Run Rdiff Directly on R Objects
Diff-class

Diff Result Object