Description Usage Arguments Value Note Examples
View source: R/betterGreater.R
Test two values to see if one is greater, where NA is equal to NA, and NA < -Inf
1 | betterGreater(x, y = NULL)
|
x |
A numeric vector of length 1 or 2 |
y |
A numeric vector of length 1 (if /codex is atomic) or NULL |
TRUE if the the first value is greater (where any number is considered greater than NA), otherwise FALSE
Instead of two arguments, this function will also accept a single vector of length 2 and compare the the two elements.
1 2 3 4 5 6 7 8 9 10 11 12 | betterGreater(5, 5)
betterGreater(105, -23.6)
betterGreater(9, NA)
betterGreater(5, 6)
betterGreater(NA, 7)
betterGreater(NA, NA)
betterGreater(-Inf, NA)
betterGreater(NA, -Inf)
betterGreater(15, -Inf)
betterGreater(-Inf, -45)
valuesToCheck = c(10, 13)
betterGreater(x = valuesToCheck)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.