Learn R Programming

diffviewer (version 0.1.1)

visual_diff: HTML widget to visually compare two files

Description

Currently supports:

  • image diffs for .svg and .png

  • tabular diffs for .csv

  • text diffs for everything else

Usage

visual_diff(file_old, file_new, width = NULL, height = NULL)

Arguments

file_old, file_new

Paths to files to compare

width, height

Output size

Value

A HTML widget

See Also

visual_diff_output() for use within Shiny apps

Examples

Run this code
# NOT RUN {
path1 <- tempfile()
path2 <- tempfile()
writeLines(letters, path1)
writeLines(letters[-13], path2)

if (interactive()) {
  visual_diff(path1, path2)
}
# }

Run the code above in your browser using DataLab