umx_print {umx}R Documentation

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"),
  caption = NULL,
  report = c("markdown", "html"),
  file = c(NA, "tmp.html"),
  na.print = "",
  zero.print = "0",
  justify = "none",
  quote = FALSE,
  suppress = NULL,
  kableExtra = TRUE,
  append = FALSE,
  sortableDF = TRUE,
  html_font = NULL,
  style = c("paper", "material_dark", "classic", "classic_2", "minimal", "material"),
  bootstrap_options = c("hover", "bordered", "condensed", "responsive"),
  lightable_options = "striped",
  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"))

caption

Optional caption.

report

How to report the results. "html" = open in browser.

file

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

na.print

How to display NAs (default = "")

zero.print

How to display 0 values (default = "0") for sparse tables, using "." can produce more readable results.

justify

Parameter passed to print (defaults to "none")

quote

Whether or not to quote strings (FALSE)

suppress

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

kableExtra

Whether to print the table using kableExtra (if report="html")

append

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

sortableDF

If html, is table sortable? (TRUE)

html_font

Override default font. e.g. "Times" or '"Arial Narrow", arial, helvetica, sans-s'

style

The style for the table "paper","material_dark" etc.

bootstrap_options

e.g. border etc.

lightable_options

e.g. striped

both

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

...

Optional parameters for print

Value

See Also

umx_msg(), umx_set_table_format()

Other Miscellaneous Utility Functions: install.OpenMx(), libs(), qm(), umxLav2RAM(), umxModelNames(), umxRAM2Lav(), umxVersion(), umx_array_shift(), umx_find_object(), umx_lower.tri(), umx_msg(), umx_open_CRAN_page(), umx_pad(), umx

Examples

data(mtcars)
umx_print(mtcars[1:10,], digits = 2, zero.print = ".", justify = "left")
umx_print(mtcars[1,1:2], digits = 2, zero.print = "")
umx_print(mtcars[1,1:2], digits = 2, caption = "Hi: I'm the caption!")
## Not run: 
umx_print(mtcars[1:10,], report = "html")

## End(Not run)

[Package umx version 4.20.0 Index]