Learn R Programming

MplusAutomation (version 0.2-5)

createTable: Create HTML/LaTex Table from parsed Mplus Models

Description

THIS FUNCTION IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION. PLEASE USE showSummaryTable, HTMLSummaryTable, or LatexSummaryTable FOR SIMILAR FUNCTIONALITY. Creates an HTML or LaTex table that displays model summary statistics for a variety of parsed Mplus models. This function expects to receive a data.frame generated by the extractModelSummaries command. If latex is FALSE, then the output is an HTML file specified by filename. Otherwise, a LaTex table generated by xtable is returned.

Usage

createTable(modelList, filename = file.path(getwd(), "Model Comparison.html"),
	sortby = "AICC", display = TRUE, latex = FALSE, 
	dropCols = c("InputInstructions", "Observations"), label = NULL)

Arguments

modelList
A list of models (as a data.frame) returned from the extractModelSummaries function.
filename
The name of the HTML file to be created. Can be an absolute or relative path. If filename is a relative path or just the filename, then it is assumed that the file resides in the working directory getwd().
sortby
optional. Field name (as character string) by which to sort the table. Typically an information criterion (e.g., "AIC" or "BIC") is used to sort the table.
display
optional. When creating an HTML file containing the table, this parameter specifies whether to display the table upon creation (TRUE or FALSE).
latex
optional. The createTable function will return a LaTex table if latex is TRUE. If FALSE, the function will write the table to an HTML file specified by filename.
dropCols
optional. A vector of character strings specifying which columns should be dropped from the modelList data frame prior to creating the table. Defaults to c("inputInstructions", "Observations").
label
optional. A character string specifying the LaTex label for the table. Only relevant when latex is TRUE.

Value

  • If latex is TRUE, then a LaTex-formatted table summarizing the modelList is returned (created by xtable). Otherwise, nothing is returned because an HTML file is created.

See Also

extractModelSummaries showSummaryTable HTMLSummaryTable LatexSummaryTable xtable