checklist | R Documentation |
is_check_formula(x)
checks whether x
is a check formula, while
is_checklist(x)
checks whether x
is a checklist, i.e., a
list of check formulae. (Neither function verifies logical consistency of the
implied checks.)
is_check_formula(x)
is_checklist(x)
x |
Object to test. |
is_check_formula
, resp. is_checklist
, returns
TRUE
or FALSE
, according to whether x
is or is not a
check formula, resp. checklist.
firmly (on the specification and use of check formulae)
is_check_formula(list(~x, ~y) ~ is.numeric) # [1] TRUE
is_check_formula("Not positive" ~ {. > 0}) # [1] TRUE
is_checklist(list(list(~x, ~y) ~ is.numeric, "Not positive" ~ {. > 0}))
# [1] TRUE
# Invalid checklists
is_checklist("Not positive" ~ {. > 0}) # [1] FALSE (not a list)
is_checklist(list(is.numeric ~ list(~ x))) # [1] FALSE (backwards)
is_checklist(list(list(log ~ x) ~ is.character)) # [1] FALSE (invalid check item)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.