Rdiff_chr: Run Rdiff Directly on R Objects

Description Usage Arguments Details Value Note See Also

View source: R/rdiff.R

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

1
2
3
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 Rdiff_chr, any R object with Rdiff_obj, or a file pointing to an RDS object

to

character same as from

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 tools::Rdiff

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 printed 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).

See Also

ses, diff*


diffobj documentation built on Oct. 5, 2021, 9:07 a.m.