print.tinytable function

Print, display, or convert a tinytable object

Print, display, or convert a tinytable object

This function is called automatically by R whenever a tinytable object is anprinted to the console or in an HTML viewer pane.

## S3 method for class 'tinytable' print(x, output = get_option("tinytable_print_output", default = NULL), ...)

Arguments

  • x: A data frame or data table to be rendered as a table.

  • output: format in which a Tiny Table is printed: NULL or one of "latex", "markdown", "html", "typst", "dataframe". If NULL, the output is chosen based on these rules:

    • When called from a script in non-interactive mode, the default is "markdown" (interactive() == FALSE).
    • When called interactively in RStudio, the default is to display an HTML table in the viewer pane.
    • When called interactively in another development environment, the default is "markdown".
    • The default print output can be changed for an entire R session by calling: options(tinytable_print_output = "html")
    • The default print output can be changed for a single tinytable object by modifying the output S4 slot.
  • ...: Other arguments are ignored.

Returns

launch a browser window or cat() the table to console.

  • Maintainer: Vincent Arel-Bundock
  • License: GPL (>= 3)
  • Last published: 2025-03-23