umx (version 4.0.0)

umx_print: Print tables in a range of formats (markdown default, see umx_set_table_format() for other formats) or as a web browser table.

Description

To aid interpretability of printed tables from OpenMx (and elsewhere) you can change how NA and zero appear, and suppressing values below a certain cut-off. By default, Zeros have the decimals suppressed, and NAs are suppressed altogether.

Usage

umx_print(
  x,
  digits = getOption("digits"),
  quote = FALSE,
  na.print = "",
  zero.print = "0",
  justify = "none",
  file = c(NA, "tmp.html"),
  suppress = NULL,
  append = FALSE,
  sortableDF = TRUE,
  both = TRUE,
  ...
)

Arguments

x

A data.frame to print (matrices will be coerced to data.frame)

digits

The number of decimal places to print (getOption("digits"))

quote

Parameter passed to print (FALSE)

na.print

String to replace NA with ("")

zero.print

String to replace 0.000 with ("0")

justify

Parameter passed to print (defaults to "none")

file

whether to write to a file (defaults to NA (no file). Use "tmp.html" to open table in browser.

suppress

minimum numeric value to print (NULL = print all values, no matter how small)

append

If html, is this appended to file? (FALSE)

sortableDF

If html, is table sortable? (TRUE)

both

If html, is table also printed as markdown? (TRUE)

...

Optional parameters for print

Value

  • A dataframe of text

See Also

umx_msg(), umx_set_table_format()

Other Miscellaneous Utility Functions: install.OpenMx(), qm(), umxBrownie(), umxLav2RAM(), umxRAM2Lav(), umxVersion(), umx_array_shift(), umx_find_object(), umx_msg(), umx_open_CRAN_page(), umx_pad(), umx_score_scale(), umx

Examples

Run this code
# NOT RUN {
umx_print(mtcars[1:10,], digits = 2, zero.print = ".", justify = "left")
umx_print(mtcars[1,1:2], digits = 2, zero.print = "")
# }
# NOT RUN {
umx_print(mtcars[1:10,], file = "html")
umx_print(mtcars[1:10,], file = "tmp.html")
# }

Run the code above in your browser using DataCamp Workspace