https://github.com/muschellij2/diffr
R package for creating code differences in JavaScript based on codediff.js
https://github.com/muschellij2/diffr
Last synced: 5 months ago
JSON representation
R package for creating code differences in JavaScript based on codediff.js
- Host: GitHub
- URL: https://github.com/muschellij2/diffr
- Owner: muschellij2
- Created: 2015-11-19T20:24:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-01T03:01:23.000Z (10 months ago)
- Last Synced: 2025-08-14T11:59:28.107Z (5 months ago)
- Language: JavaScript
- Size: 99.6 KB
- Stars: 66
- Watchers: 4
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-shiny-extensions - diffr - Create code diff widgets based on codediff.js. (UI Components / Code Diff)
README
# diffr
[](https://github.com/muschellij2/diffr/actions/workflows/R-CMD-check.yaml)
The goal of `diffr` is an R package for creating code differences in
JavaScript based on:
[](https://travis-ci.org/muschellij2/diffr)
``` r
library(diffr)
file1 = tempfile()
writeLines("hello, world!\n", con = file1)
file2 = tempfile()
writeLines(paste0(
"hello world?\nI don't get it\n",
paste0(sample(letters, 65, replace = TRUE), collapse = "")), con = file2)
```
``` r
diffr(file1, file2, before = "f1", after = "f2")
```