| OpsCompare {container} | R Documentation | 
Comparison Operators
Description
Binary comparison operators for Container() objects and
derived classes.
Usage
## S3 method for class 'Container'
x == y
## S3 method for class 'Container'
x != y
## S3 method for class 'Container'
x < y
## S3 method for class 'Container'
x > y
## S3 method for class 'Container'
x <= y
## S3 method for class 'Container'
x >= y
Arguments
| x,y | at least one must be a  | 
Details
-  x == yisTRUEif the contents ofxandyare lexicographically equal.
-  x != yisTRUEif the contents ofxandyare not equal.
-  x < yisTRUEif the contents of x are lexicographically less than the contents of y.
-  x <= yisTRUEif the contents of x are lexicographically less than or equal to the contents of y.
Examples
c1 = container(1, 2, 3)
c2 = container(1, 3, 2)
c1 == c1            # TRUE
c1 != c2            # TRUE
c1 <= c1            # TRUE
c1 == c2            # FALSE
c1 < c2             # TRUE
c1 < container(2)   # TRUE
c1 < container()    # FALSE
[Package container version 1.0.4 Index]