Skip to content

Commit

Permalink
Merge branch 'main' into multi_group_tt
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Jan 30, 2024
2 parents 25ce440 + eeca03b commit aa52fba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
13 changes: 10 additions & 3 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ knit_print.tinytable <- function(x,
}


#' Print a tinytable to console or viewer pane
#' Print a tinytable to console or in an HTML viewer pane
#'
#' This function is called automatically by `R` whenever a `tinytable` object is anprinted to the console or in an HTML viewer pane.
#'
#' @inheritParams tt
#' @param output One of "latex", "markdown", "html". If NULL, will guess the output based on the environment (interactive, RStudio, etc.).
#' @param output format in which a Tiny Table is printed: `NULL` or one of `"latex"`, `"markdown"`, `"html"`, `"typst"`. 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` element of the meta data attribute: `attr(x,"tinytable_meta")`
#' @param ... Other arguments are ignored.
#' @return launch a browser window or cat() the table to console.
#' @export
Expand Down Expand Up @@ -88,6 +95,6 @@ print.tinytable <- function(x,
stop("here be dragons")
}


return(invisible(x))
}

2 changes: 2 additions & 0 deletions altdoc/quarto_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ website:
file: man/group_tt.qmd
- text: "`plot_tt`"
file: man/plot_tt.qmd
- text: "`print`"
file: man/print.tyinytable.qmd
- text: "`save_tt`"
file: man/save_tt.qmd
- text: News
Expand Down
13 changes: 10 additions & 3 deletions man/print.tinytable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aa52fba

Please sign in to comment.