is_valid | R Documentation |
Test for nchars() or nrows() of object.
For lists, returns TRUE
if
at least one member of the list passes validity test.
NA
objects return FALSE
.
is_valid(x, n = 1)
x |
Object for length test. |
n |
Minimum number of characters if character or numeric; Minimum number of rows if data frame. |
# For a character string
is_valid("MyName", n = 3)
is_valid(as.character(NA), n = 1)
# For a data frame
is_valid(data.frame(X = 1), n = 1)
is_valid(data.frame(X = 1), n = 2)
# For numeric
is_valid(13, n = 2)
# For a list
is_valid(list(NA, "MyName"), n = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.