View source: R/validation-helpers.R
| validateIsIncluded | R Documentation |
Check if values are included
validateIsIncluded(values, parentValues, nullAllowed = FALSE)
values |
A vector of values. |
parentValues |
A vector of values where |
nullAllowed |
If |
Returns NULL if child value is included in parent value set, otherwise
error is signaled.
A <- data.frame(
col1 = c(1, 2, 3),
col2 = c(4, 5, 6),
col3 = c(7, 8, 9)
)
# will return NULL if child value is included in parent value set
validateIsIncluded("col3", names(A))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.