Given two R output files, compute differences ignoring headers, footers and some other differences.
filepaths to be compared
logical: extra pruning for ‘-Ex.Rout’ files to exclude the header.
logical: should the displayed addresses of
pointers be set to
logical: should the returned value include a log of differences found?
The R startup banner and any timing information from
BATCH are removed from both files, together with lines about
loading packages. UTF-8 fancy quotes (see
on Windows, Windows' so-called ‘smart quotes’, are mapped to
a simple quote. Addresses of environments, compiled bytecode and
other exotic types expressed as hex addresses
<environment: 0x12345678>) are mapped to
0x00000000. The files are then compared line-by-line. If
there are the same number of lines and
useDiff is false, a
diff -b -like display of differences is printed
(which ignores trailing spaces and differences in numbers of
consecutive spaces), otherwise
diff -bw is called on the
edited files. (This tries to ignore all differences in whitespace:
note that flag -w is not required by POSIX but is supported
by GNU, Solaris and FreeBSD versions.)
This can compare uncompressed PDF files, ignoring differences in creation and modification dates.
Log is true, a list with components
out, a character vector of descriptions of
differences, possibly of zero length.
Otherwise, a status indicator,
0L if and only if no differences
The shell script run as
R CMD Rdiff.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.