Learn R Programming

compare (version 0.2-6)

compareIdentical: Compare Two Objects for Identity

Description

This function is just a wrapper for the identical() function to determine whether two objects are identical. Its usefulness is in being able to be combined with other functions in the compare package that perform much more relaxed comparisons.

Usage

compareIdentical(model, comparison, transform = character(), ...)

Arguments

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.
...
Allows arguments that are only relevant to other comparison functions.

Value

An object of class "comparison". Use isTRUE() to determine whether the comparison has succeeded.

See Also

compare and compareEqual

Examples

Run this code
compareIdentical(1:10/10, 1:10/10)
compareIdentical(1:10/10, 3:12/10 - 2/10)

Run the code above in your browser using DataLab