check_lavaan_uses | R Documentation |
check_lavaan_uses
inspects the model data frame produced by
check_lavaan_df
according to the arguments you specify. If it
cannot find any rows in the data frame that match all of the arguments and
corresponding values, the function will fail.
check_lavaan_uses(state, incorrect_msg, append = TRUE, ...)
state |
state to start from (has to be the state produced by
|
incorrect_msg |
feedback message in case the specified columns and values were not found in the lavaan data frame. |
append |
whether or not to append the |
... |
named args are columns of lavaanify output, and their values are used to subset that output. |
To see which arguments you can pass to the ellipsis argument, use
lavaan::lavaanify
on a lavaan model. Examples of arguments are
lhs
, op
, and rhs
, among others.
## Not run: # example 1 # lavaan::lavaanify(model) produces df with 3 rows model <- 'a ~ x1' # sct ex() %>% check_object("model") %>% check_lavaan_df() %>% check_lavaan_uses(lhs = 'a', op = '~', rhs = 'x1') # example 2 # lavaan::lavaanify(model) produces df with 6 rows model <- 'a ~ x1 + x3' # sct ex() %>% check_object("model") %>% check_lavaan_df() %>% check_lavaan_uses(lhs = 'a', op = '~', rhs = 'x1') # sct ex() %>% check_object("model") %>% check_lavaan_df() %>% check_lavaan_uses(lhs = 'a', op = '~', rhs = 'x3') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.