
Last chance! 50% off unlimited learning
Sale ends in
Compare either the print
ed or str
screen representation of
R objects depending on which is estimated to produce the most useful
diff. The selection process tries to minimize screen lines while maximizing
differences shown subject to display constraints. The decision algorithm is
likely to evolve over time, so do not rely on this function making
a particular selection under specific circumstances. Instead, use
diffPrint
or diffStr
if you require one or the
other output.
diffObj(target, current, ...)
a Diff
object; see diffPrint
.
the reference object
the object being compared to target
unused, for compatibility of methods with generics
diffPrint
for details on the diff*
methods,
diffStr
,
diffChr
to compare character vectors directly
diffDeparse
to compare deparsed objects,
ses
for a minimal and fast diff
## `pager="off"` for CRAN compliance; you may omit in normal use
diffObj(letters, c(letters[1:10], LETTERS[11:26]), pager="off")
with(mtcars, diffObj(lm(mpg ~ hp)$qr, lm(mpg ~ disp)$qr, pager="off"))
Run the code above in your browser using DataLab