View source: R/validation-helpers.R
| validateIsOfLength | R Documentation |
Check if objects have expected length
validateIsOfLength(object, nbElements)
object |
An object or a list of objects |
nbElements |
number of elements that are supposed in object |
If validations are successful, NULL is returned. Otherwise, error is
signaled.
# returns `NULL` if of objects are of specified length
validateIsOfLength(list(1, 2), 2L)
# error otherwise
# validateIsOfLength(c("3", "4"), 3L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.