if (FALSE) {
# Example 1: Write Mplus Data File and a Mplus input template
write.mplus(mtcars)
# Example 2: Write Mplus Data File "mtcars.dat" and a Mplus input template "mtcars_INPUT.inp",
# missing values coded with -999,
# write variable names in a text file called "mtcars_VARNAMES.inp"
write.mplus(mtcars, file = "mtcars.dat", var = TRUE, na = -999)
}
Run the code above in your browser using DataLab