Skip to content

Instantly share code, notes, and snippets.

@geotheory
Created April 29, 2026 21:19
Show Gist options
  • Select an option

  • Save geotheory/cad576c0f2c96f4571ba722fdfd6dbaf to your computer and use it in GitHub Desktop.

Select an option

Save geotheory/cad576c0f2c96f4571ba722fdfd6dbaf to your computer and use it in GitHub Desktop.
install.packages("diffobj")
library(diffobj)
t1 = readLines('v1.txt') |> paste(collapse = '\n')
t2 = readLines('v2.txt') |> paste(collapse = '\n')
diffChr(t1, t2, word.diff=T)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment