test.equal {tframe}R Documentation

Compare Two Objects

Description

Generic function to compare two objects. The methods return a logical value, T if the objects are the same type and value and F otherwise. The default compares array values but not attributes or class. Some descriptive information in the objects may be ignored.

Usage

    test.equal(obj1,obj2, ...)
    test.equal(obj1,obj2, fuzz=0)
    test.equal(obj1,obj2, fuzz=0)
    test.equal(obj1,obj2, fuzz=0)
    test.equal(obj1,obj2, fuzz=0)
    test.equal(obj1,obj2, fuzz=0)
    

Arguments

obj1, obj2 Objects of the same class.
fuzz Differences less than fuzz are ignored.

Details

The functions for comparing numeric values used in the default method for this generic replacement.

Value

T or F.

See Also

test.equal.tframe

Examples

test.equal(matrix(1:10,10,2), array(1:10, c(10,2)))
test.equal(matrix(1:10,10,1),1:10)