Description Usage Arguments Value Note Examples
Test two values for equality, where NA is equal to NA
1 | betterComp(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 two values are equal or if both are NA, and FALSE if they are not equal or if exactly one is NA
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 | betterComp(5, 5)
betterComp(9, NA)
betterComp(5, 6)
betterComp(NA, 7)
betterComp(NA, NA)
valuesToCheck = c(10, 13)
betterComp(x = valuesToCheck)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.