Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/muschellij2/diffr

R package for creating code differences in JavaScript based on codediff.js
https://github.com/muschellij2/diffr

Last synced: 29 days ago
JSON representation

R package for creating code differences in JavaScript based on codediff.js

Awesome Lists containing this project

README

        

[![Travis-CI Build Status](https://travis-ci.org/muschellij2/diffr.svg?branch=master)](https://travis-ci.org/muschellij2/diffr)

R package for creating code differences in JavaScript based on:

https://github.com/danvk/codediff.js

``` 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)
diffr(file1, file2, before = "f1", after = "f2")
```

![](img/diffr-example.png)