write_mplus_data: Write data file for Mplus, including setting working...

View source: R/write_mplus_data.R

write_mplus_dataR Documentation

Write data file for Mplus, including setting working directory

Description

This function modifies prepareMplusData from the MplusAutomation package. It changes the working directory to allow you to get a shortened file name in the pasted syntax.

Usage

write_mplus_data(df, wd_for_analysis, filename, writeData, hashfilename)

Arguments

df

Argument used by MplusAutomation::prepareMplusData. From the prepareMplusData documentation: The R data.frame to be prepared for Mplus.

wd_for_analysis

Working directory where you want your .dat file to be saved. This is where your .inp file should also be saved.

filename

Argument used by MplusAutomation::prepareMplusData. From the prepareMplusData documentation: The filename for the tab-delimited data file for use with Mplus.

writeData

Argument used by MplusAutomation::prepareMplusData. From the prepareMplusData documentation: A character vector, one of 'always', 'ifmissing', 'never' indicating whether the data files (*.dat) should be written to disk. Defaults to ‘always’ for consistency with previous behavior. See details for further information.

hashfilename

Argument used by MplusAutomation::prepareMplusData. From the prepareMplusData documentation: A logical whether or not to add a hash of the raw data to the data file name. Defaults to FALSE for consistency with previous behavior where this feature was not available.

Value

Writes .dat file formatted for Mplus to the proper working directory. It also returns the Mplus syntax to copy/paste into a .inp file that goes into the same working directory.


e-mcbride/covid19.commuting documentation built on April 14, 2022, 5:30 p.m.