Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getSavedata_Fileinfo

Read Variable Names, Formats, and Widths from data generated by the SAVEDATA Command


Description

This function reads the SAVEDATA INFORMATION section from an Mplus output file that used the SAVEDATA command, and it returns a list with the filename, variable names, variable formats, and variable widths of the SAVEDATA file. If present, the function also parses information about the Bayesian Parameters (BPARAMETERS) file.

Usage

getSavedata_Fileinfo(outfile)

Arguments

outfile

required. The name of the Mplus output file to read. Can be an absolute or relative path. If outfile is a relative path or just the filename, then it is assumed that the file resides in the working directory getwd().

Value

Returns a list of SAVEDATA file information that includes:

fileName

The name of the file containing the analysis dataset created by the Mplus SAVEDATA command.

fileVarNames

A character vector containing the names of variables in the dataset.

fileVarFormats

A character vector containing the Fortran-style formats of variables in the dataset.

fileVarWidths

A numeric vector containing the widths of variables in the dataset (which is stored in fixed-width format).

bayesFile

The name of the BPARAMETERS file containing draws from the posterior distribution created by the Mplus SAVEDATA BPARAMETERS command.

bayesVarNames

A character vector containing the names of variables in the BPARAMETERS dataset.

tech3File

A character vector of the tech 3 output.

tech4File

A character vector of the tech 4 output.

Author(s)

Michael Hallquist

See Also

Examples

## Not run: 
  fileInfo <- getSavedata_Fileinfo("C:/Program Files/Mplus/Test Output.out")

## End(Not run)

MplusAutomation

An R Package for Facilitating Large-Scale Latent Variable Analyses in Mplus

v0.8
LGPL-3
Authors
Michael Hallquist [aut, cre], Joshua Wiley [aut], Caspar van Lissa [ctb], Daniel Morillo [ctb]
Initial release
2020-09-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.