Learn R Programming

berryFunctions (version 1.5.2)

compFiles: compare two textfiles for equality

Description

returns the line numbers where two (text)files differ

Usage

compFiles(file1, file2, nr=20, startline=1, endline=length(f1), quiet=FALSE, ... )

Arguments

file1, file2
Filenames to be read by readLines.
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 readLines

Value

See Also

combineTextfiles

Examples

Run this code
filenames <- system.file(paste0("extdata/Versuch",1:2,".txt"), package="berryFunctions")
compFiles(filenames[1], filenames[2], warn=FALSE)

Run the code above in your browser using DataLab