qassertr | R Documentation |
These functions are the tuned counterparts of qtest
,
qassert
and qexpect
tailored for recursive
checks of list elements or data frame columns.
qassertr(x, rules, .var.name = vname(x))
qtestr(x, rules, depth = 1L)
qexpectr(x, rules, info = NULL, label = vname(x))
x |
[ |
rules |
[ |
.var.name |
[ |
depth |
[ |
info |
[ |
label |
[ |
See qassert
.
qtest
, qassert
# All list elements are integers with length >= 1?
qtestr(as.list(1:10), "i+")
# All list elements (i.e. data frame columns) are numeric?
qtestr(iris, "n")
# All list elements are numeric, w/o NAs?
qtestr(list(a = 1:3, b = rnorm(1), c = letters), "N+")
# All list elements are numeric OR character
qtestr(list(a = 1:3, b = rnorm(1), c = letters), c("N+", "S+"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.