compareFiles | R Documentation |
Returns the line numbers where two (text)files differ
compareFiles(
file1,
file2,
nr = 20,
startline = 1,
endline = length(f1),
quiet = FALSE,
...
)
file1 , file2 |
Filenames to be read by |
nr |
number of results printed. DEFAULT: 20 |
startline , endline |
start and end lines, e.g. to exclude section that is already compared. |
quiet |
show warnings about file lengths? DEFAULT: FALSE |
... |
further arguments passed to |
Vector of line numbers that differ, result from head(..., nr)
Berry Boessenkool, berry-b@gmx.de, Aug 2014
https://text-compare.com/ which I sadly only discovered after writing this function,
dupes
for finding duplicate lines, combineFiles
filenames <- system.file(paste0("extdata/versuch",1:2,".txt"), package="berryFunctions")
compareFiles(filenames[1], filenames[2], warn=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.