View source: R/validate_tags.R
validate_tags | R Documentation |
This function evaluates the validity of the tags of a safeframe
object by
checking that: i) tags are present ii) tags is a list
of character
or
NULL
values.
validate_tags(x)
x |
a |
If checks pass, a safeframe
object; otherwise issues an error.
validate_types()
to check if tagged variables have
the right classes
## create a valid safeframe
x <- cars |>
make_safeframe(
mph = "speed",
distance = "dist"
)
x
## the below issues an error as safeframe doesn't know any defaults
## note: tryCatch is only used to avoid a genuine error in the example
tryCatch(validate_safeframe(x), error = paste)
## validation requires you to specify the types directly
validate_safeframe(x,
mph = c("integer", "numeric"),
distance = "numeric"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.