Description Usage Arguments Details Value Author(s) See Also Examples
Compare two objects for equality, ignoring the case of name attributes, or ignoring name attributes altogether, if necessary beforehand.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | compareIgnoreNameCase(model, comparison, transform = character(),
equal = TRUE, ...)
## S3 method for class 'data.frame'
compareIgnoreNameCase(model, comparison, transform=character(),
equal=TRUE,
colsOnly=TRUE,
ignoreColOrder=FALSE,
ignoreNameCase=FALSE,
...)
compareIgnoreNames(model, comparison, transform=character(),
equal=TRUE, ...)
## S3 method for class 'data.frame'
compareIgnoreNames(model, comparison, transform=character(),
equal=TRUE,
colsOnly=TRUE,
ignoreColOrder=FALSE,
ignoreNameCase=FALSE,
...)
|
model |
The “correct” object. |
comparison |
The object to be compared with the |
transform |
A character vector containing any transformations that have been performed on the objects prior to this comparison. |
equal |
Whether to test for equality if the test for identity fails. |
colsOnly |
Only ignore (case of) column names (NOT row names). |
ignoreColOrder |
For data frames and lists, sort the columns or components by name before ignoring the case of names. |
ignoreNameCase |
When reordering the columns or components by
name (i.e., when |
... |
Arguments passed to |
These functions are generic, with specific methods for data frames and lists.
An object of class "comparison"
.
Use isTRUE()
to determine whether the
comparison has succeeded.
Paul Murrell
compare
and
compareEqual
1 2 3 4 5 | model <- data.frame(x=1:26, y=letters, z=factor(letters),
stringsAsFactors=FALSE)
comparison <- data.frame(a=1:26, b=letters, c=factor(letters),
stringsAsFactors=FALSE)
compareIgnoreNames(model, comparison)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.