Skip to content

Commit 94b0502

Browse files
committed
add option for use_Symbols
1 parent 2cf02d5 commit 94b0502

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

R/format_table.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
#' with a scientific format (e.g., 4.24e5), else as truncated values (as "> 1000"
3333
#' and "< 1/1000").
3434
#' @param use_symbols Logical, if `TRUE`, column names that refer to particular
35-
#' effectsizes (like Phi, Omega or Epsilon) include the related unicode-character
36-
#' instead of the written name. This only works on Windows for R >= 4.2, and on
37-
#' OS X or Linux for R >= 4.0.
35+
#' effectsizes (like Phi, Omega or Epsilon) include the related unicode-character
36+
#' instead of the written name. This only works on Windows for R >= 4.2, and on
37+
#' OS X or Linux for R >= 4.0. It is possible to define a global option for this
38+
#' setting, see 'Note'.
3839
#' @param ... Arguments passed to or from other methods.
3940
#' @inheritParams format_p
4041
#' @inheritParams format_value
@@ -43,6 +44,8 @@
4344
#' @seealso Vignettes [Formatting, printing and exporting tables](https://easystats.github.io/insight/articles/display.html)
4445
#' and [Formatting model parameters](https://easystats.github.io/parameters/articles/model_parameters_formatting.html).
4546
#'
47+
#' @note `options(insight_use_symbols = TRUE)` override the `use_symbols` argument
48+
#' and always displays symbols, if possible.
4649
#' @examples
4750
#' format_table(head(iris), digits = 1)
4851
#'
@@ -75,7 +78,7 @@ format_table <- function(x,
7578
zap_small = FALSE,
7679
preserve_attributes = FALSE,
7780
exact = TRUE,
78-
use_symbols = FALSE,
81+
use_symbols = getOption("insight_use_symbols", FALSE),
7982
verbose = TRUE,
8083
...) {
8184
# sanity check

man/format_table.Rd

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)