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)

### Arguments

`from, to` | filepaths to be compared
`useDiff` | should `diff` always be used to compare results?

### 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

`0L` if no differences were found, otherwise `1L`

### See Also

The shell script run as `R CMD Rdiff`.

[Package tools version 2.9.2 Index]