Rdiff_chr {diffobj} | R Documentation |
Run Rdiff Directly on R Objects
Description
These functions are here for reference and testing purposes. They are
wrappers to tools::Rdiff
and rely on an existing system diff utility.
You should be using ses
or diffChr
instead of
Rdiff_chr
and diffPrint
instead of Rdiff_obj
.
See limitations in note.
Usage
Rdiff_chr(from, to, silent = FALSE, minimal = FALSE, nullPointers = TRUE)
Rdiff_obj(from, to, silent = FALSE, minimal = FALSE, nullPointers = TRUE)
Arguments
from |
character or object coercible to character for |
to |
character same as |
silent |
TRUE or FALSE, whether to display output to screen |
minimal |
TRUE or FALSE, whether to exclude the lines that show the actual differences or only the actual edit script commands |
nullPointers |
passed to |
Details
Rdiff_chr
runs diffs on character vectors or objects coerced to
character vectors, where each value in the vectors is treated as a line in a
file. Rdiff_chr
always runs with the useDiff
and Log
parameters set to TRUE
.
Rdiff_obj
runs diffs on the print
ed representation of
the provided objects. For each of from
, to
, will check if they
are 1 length character vectors referencing an RDS file, and will use the
contents of that RDS file as the object to compare.
Value
the Rdiff output, invisibly if silent
is FALSE
Rdiff_chr(letters[1:5], LETTERS[1:5])
Rdiff_obj(letters[1:5], LETTERS[1:5])
Note
These functions will try to use the system diff
utility. This
will fail in systems that do not have that utility available (e.g. windows
installation without Rtools).