Rdiff {tools}R Documentation

Difference R Output Files

Description

Given two R output files, compute differences ignoring headers, footers and some encoding differences.

Usage

Rdiff(from, to, useDiff = FALSE, forEx = FALSE, Log = FALSE)

Arguments

from, to filepaths to be compared
useDiff should diff always be used to compare results?
forEx logical: extra pruning for ‘-Ex.Rout’ files to exclude the header.
Log logical: should be value include a log of differences found?

Details

The R startup banner and any timing information from R CMD BATCH are removed from both files, together with lines about loading packages. UTF-8 fancy quotes (see sQuote) and on Windows, Windows so-called ‘smart quotes’ are mapped to a simple quote. The files are then compared line-by-line. If there are the same number of lines and useDiff is false, a simple diff-like display of differences is printed, otherwise diff -bw is called on the edited files.

Value

If Log is true, a list with components status (see below) and out, a character vector of descriptions of differences, possibly of zero length.

Otherwise, a status indicator, 0L if and only if no differences were found.

See Also

The shell script run as R CMD Rdiff.


[Package tools version 2.13.0 Index]