e1 OP e2 OP e1
"factor", for
Ops.factor, or from
"ordered", for
Ops.ordered.
The method will fail for arithmetic or logical operators.
Each argument of the relevant class is converted to a vector,
and the relevant
comparison applied to the result.
In the case of factors, only equality/inequality comparisons are meaningful
(the levels of a factor are unordered).
For ordered factors, all comparisons are meaningful, and are applied to
the levels attribute, using its implied ordering.
This is a group method for the functions of the
Ops group,
the basic operators for arithmetic, comparison, and logic.
It succeeds only for comparison operators.
x <- 1:10
y <- factor(c("top", "bottom", "middle", "top", "bottom", "middle", "top",
"middle", "top", "bottom"))
x == y #This example works.
x > y #This example doesn't work.