library(diffviewer)

text_diff

text_diff("inst/examples/old.R", "inst/examples/old.R")
text_diff("inst/examples/old.R", "inst/examples/new.R")
# outputFormat
text_diff("inst/examples/old.R", "inst/examples/new.R", outputFormat = "side-by-side")
# matching
text_diff("inst/examples/old.R", "inst/examples/new.R")
text_diff("inst/examples/old.R", "inst/examples/new.R", matching = "lines")
text_diff("inst/examples/old.R", "inst/examples/new.R", matching = "none")
text_diff("inst/examples/current.json", "inst/examples/current.json")
text_diff("inst/examples/current.json", "inst/examples/expected.json")
# outputFormat
text_diff("inst/examples/current.json", "inst/examples/expected.json", outputFormat = "side-by-side")
# matching
text_diff("inst/examples/current.json", "inst/examples/expected.json")
text_diff("inst/examples/current.json", "inst/examples/expected.json", matching = "lines")
text_diff("inst/examples/current.json", "inst/examples/expected.json", matching = "word")

img_diff

img_diff("inst/examples/img_expected.png", "inst/examples/img_current.png")
img_diff("inst/examples/img_expected.png", "inst/examples/img_expected.png")