gt | R Documentation |
Compare multiple vectors
gt(...)
lt(...)
eq(...)
neq(...)
leq(...)
geq(...)
x %>>% y
x %<<% y
x %==% y
x %!=% y
x %<=% y
x %>=% y
x, y, ... |
Vectors, typically numerical, to be compared. |
A logical vector. For the operator, a last_y
attribute stores the
last RHS values from the comparisons (strip away with as.vector()
). See
examples.
x <- c(1, 3, 1, 1, 2)
y <- c(2, 2, 1, 1, 1)
z <- c(3, 1, 1, 2, 1)
lt(x, y, z) # >
eq(x, y, z) # ==
neq(x, y, z) # !=
leq(x, y, z) # <=
geq(x, y, z) # >=
gt(x, y, z) # <
# same as
x %>>% y %>>% z
# same as
x > y & y > z
# Operators can be mixed!
x %>>% y %==% z
# Or broken
(l1 <- x %>>% y)
(l2 <- l1 %==% z)
# same as
x > y & y == z
as.vector(l2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.