assert | R Documentation |
Assert the class and length of an object
assert(
x,
what,
name = NULL,
length_check = TRUE,
length_req = NULL,
stopOnFail = NULL
)
x |
an R object |
what |
(character) The class(es) that the object should be |
name |
(character) The name of the R object (used in error messages) |
length_check |
(logical) Whether to check if the object has length (Default: TRUE) |
length_req |
(numeric) The required length of x. |
stopOnFail |
Whether the function stops as soon as one of the check fails, or keep going to gather all error messages at once. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.