| compareIgnoreNameCase {compare} | R Documentation |
Compare two objects for equality, ignoring the case of name attributes, or ignoring name attributes altogether, if necessary beforehand.
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 model. |
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 ignoreColOrder=TRUE),
whether to ignore the case of the names. |
... |
Arguments passed to compareEqual(). |
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
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)