Rev 58549 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/tools/man/Rdiff.Rd% Part of the R package, http://www.R-project.org% Copyright 2010-11 R Core Team% Distributed under GPL 2 or later\name{Rdiff}\alias{Rdiff}\title{Difference R Output Files}\description{Given two \R output files, compute differences ignoring headers,footers and some other differences.}\usage{Rdiff(from, to, useDiff = FALSE, forEx = FALSE, nullPointers = TRUE,Log = FALSE)}\arguments{\item{from, to}{filepaths to be compared}\item{useDiff}{should \command{diff} always be used to compareresults?}\item{forEx}{logical: extra pruning for \file{-Ex.Rout} files toexclude the header.}\item{nullPointers}{logical: should the displayed addresses ofpointers be set to \code{0x00000000} before comparison?}\item{Log}{logical: should the returned value include a log ofdifferences found?}}\details{The \R startup banner and any timing information from \command{R CMDBATCH} are removed from both files, together with lines about loadingpackages. UTF-8 fancy quotes (see \code{\link{sQuote}}) and onWindows, Windows' so-called \sQuote{smart quotes} are mapped to asimple quote. Addresses of environments, compiled bytecode and otherexotic types expressed as hex addresses (e.g. \code{<environment:0x12345678>}) are mapped to \code{0x00000000}. The files are thencompared line-by-line. If there are the same number of lines and\code{useDiff} is false, a simple \command{diff}-like display ofdifferences is printed, otherwise \command{diff -bw} is called on theedited files.As from \R 2.14.0 this can compare uncompressed PDF files, ignoringdifferences in creation and modification dates.}\value{If \code{Log} is true, a list with components \code{status} (seebelow) and \code{out}, a character vector of descriptions ofdifferences, possibly of zero length.Otherwise, a status indicator, \code{0L} if and only if no differenceswere found.}\seealso{The shell script run as \command{R CMD Rdiff}.}\keyword{utilities}