validityElement | R Documentation |
Check that all values of a vector x
is element of values of y
and return an error otherwise.
validityElement(x, y, name)
x |
vectors (of the same mode) containing a sequence of items (conceptually) with no duplicated values. |
y |
vectors (of the same mode) containing a sequence of items (conceptually) with no duplicated values. |
name |
variable name to return in the error message |
Return TRUE
if the condition is respected and an error otherwise.
x <- c(1,2,3) y <- c(2,3) z <- c(1,2,3,4) validityElement(x, y, name = "w") validityElement(x, z, name = "w")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.