compareShorten(model, comparison, transform = character(), equal = TRUE, ...)
"compareShorten"(model, comparison, transform=character(), equal=TRUE, colsOnly=TRUE, ignoreColOrder=FALSE, ignoreNameCase=FALSE, ...)
model
. compareEqual()
. "comparison"
.
Use isTRUE()
to determine whether the
comparison has succeeded.
compareIdentical()
and, if that fails and equal=TRUE
, using compareEqual()
. This function is generic, with specific methods for arrays, matrices,
tables, and data frames.
For vectors, extra elements are dropped from the longer object.
For data frames, extra columns, (and, if
colsOnly=FALSE
, extra rows) are dropped. For lists,
extra components are dropped. For arrays, extra dimensions are
dropped. For matrices, the comparison
is forced to be
two-dimensional. For tables, extra dimensions are collapsed
(using sum()
).
compare
and
compareEqual
compareShorten(1:5, 1:10)
compareShorten(matrix(1:10, ncol=2),
array(1:100, dim=c(5, 2, 10)))
Run the code above in your browser using DataLab