View source: R/check-predefined-objects.R
check_predefined_objects | R Documentation |
At the start of your SCT, you typically want to check whether some predefined
variables are still correct. test_predefined_object
allows you to
specify a vector of object names, together with a vector of equivalence
conditions, evaluation specifications, undefined an incorrect messages.
check_predefined_objects(state, name, eq_condition = "equivalent", eval = TRUE, undefined_msg = NULL, incorrect_msg = NULL)
state |
the state to start from |
name |
vector of names of the objects to check |
eq_condition |
character vector indicating how to compare. See
|
eval |
logical vector indicating whether or not you want to check only the objects' existence or also whether their values match the solution. |
undefined_msg |
vector version of |
incorrect_msg |
vector version of |
## Not run: # Suppose the sample code specifies the variables a, b and c, # and you want to check that a, b and c haven't changed. ex() %>% check_predefined_objects(c("a", "b", "c")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.