Test for Complete Equality

DESCRIPTION:

Tests two objects for complete equality. Operations on objects that really leave everything alone (for example, adding 0 to numeric objects) should retain identity, but no allowance is made for rounding error, trailing blank characters, etc. Objects of different class are not identical even if their contents are otherwise the same.

USAGE:

identical ( object1 , object2 )

REQUIRED ARGUMENTS:

object1
Any S-PLUS object.
object2
Any S-PLUS object.

VALUE:

Logical value. Returns TRUE if the two objects are exactly equal in all respects, FALSE otherwise.

SEE ALSO:

,

EXAMPLES:

x <- 1
y <- x + 0.000000001
all.equal(x, y) # returns T
identical(x, y) # returns F