read.mplus {misty} | R Documentation |
This function reads a Mplus data file and/or Mplus input/output file to return a data frame with variable names extracted from the Mplus input/output file.
read.mplus(file, sep = "", input = NULL, print = FALSE, return.var = FALSE,
fileEncoding = "UTF-8-BOM", check = TRUE)
file |
a character string indicating the name of the Mplus data
file with or without the file extension |
sep |
a character string indicating the field separator (i.e.,
delimiter) used in the data file specified in |
input |
a character string indicating the Mplus input ( |
print |
logical: if |
return.var |
logical: if |
fileEncoding |
character string declaring the encoding used on |
check |
logical: if |
A data frame containing a representation of the data in the file.
Takuya Yanagida takuya.yanagida@univie.ac.at
Muthen, L. K., & Muthen, B. O. (1998-2017). Mplus User's Guide (8th ed.). Muthen & Muthen.
read.dta
, write.dta
, read.sav
,
write.sav
, read.xlsx
, write.xlsx
## Not run:
# Example 1: Read Mplus data file and variable names extracted from the Mplus input file
dat <- read.mplus("Mplus_Data.dat", input = "Mplus_Input.inp")
# Example 2: Read Mplus data file and variable names extracted from the Mplus input file,
# print variable names on the console
dat <- read.mplus("Mplus_Data.dat", input = "Mplus_Input.inp", print = TRUE)
# Example 3: Read variable names extracted from the Mplus input file
varnames <- read.mplus(input = "Mplus_Input.inp", return.var = TRUE)
## End(Not run)