detectVariables | R Documentation |
This is a function to automatically detect the variables used in an Mplus model object.
detectVariables(object, quiet = TRUE)
object |
An Mplus model object from |
quiet |
optional. If |
A vector of variables from the R dataset to use.
Joshua F. Wiley <jwiley.psych@gmail.com>
mplusModeler
, mplusObject
example1 <- mplusObject(MODEL = "mpg ON wt;",
rdata = mtcars, autov = FALSE)
example1$usevariables
MplusAutomation:::detectVariables(example1)
example2 <- mplusObject(MODEL = "mpg ON wt;",
rdata = mtcars, autov = TRUE)
example2$usevariables
example3 <- update(example2,
MODEL = ~ . + "mpg ON qsec; wt WITH qsec;",
autov = TRUE)
example3$usevariables
rm(example1, example2, example3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.