Description Usage Arguments Value Examples
View source: R/betterGreater.R
Compare two vectors for element by element to see if the first is greater than the second
1 | VbetterGreater(x, y)
|
x |
A numeric vector |
y |
A numeric vector of the same length as |
A logical vector where each position indicates whether the values in those positions of the first input vector is greater than that of the second. NAs are considered equal to each other, and less than -Inf.
1 2 3 4 5 6 7 8 9 10 11 12 | ex1 = 6:10
ex2 = (1:5)*2
ex3 = c(1, 10, NA, 6, 10)
ex4 = c(2, NA, NA, 6, 5)
VbetterGreater(ex1, ex2)
VbetterGreater(ex1, ex3)
VbetterGreater(ex1, ex4)
VbetterGreater(ex2, ex3)
VbetterGreater(ex2, ex4)
VbetterGreater(ex3, ex4)
VbetterGreater(ex3, NA)
VbetterGreater(ex3, 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.