Skip to contents

Builds an HTML page from what import_mplus_output() already decodes: one heading per section (SUMMARY OF ANALYSIS, MODEL FIT INFORMATION, MODEL RESULTS, ...) and one <table> per detected result. Like export_stata_smcl_html(), this has no figures to embed: Mplus never writes chart data into the .out text file itself (see the file header).

Usage

export_mplus_html(path, out = NULL)

Arguments

path

path to a .out file

out

path to write the HTML file to. Without it, the file is named after path with the extension .html and written to the R session's temporary folder, which R removes when the session ends (CRAN does not allow writing elsewhere unless you ask for it); a message says where.

Value

the path written to, invisibly

Examples

out <- tempfile(fileext = ".out")
writeLines(c("Mplus VERSION 8.8", "", "INPUT INSTRUCTIONS", "",
  "  MODEL: incongruent ON congruent;", "", "MODEL RESULTS", "",
  "                                                    Two-Tailed",
  "                    Estimate       S.E.  Est./S.E.    P-Value", "",
  " INCONGRUENT ON",
  "    CONGRUENT          0.432      0.093      4.645      0.000", ""), out)
html <- export_mplus_html(out, file.path(tempdir(), "mplus.html"))
file.exists(html)
#> [1] TRUE