From 2e2ce8473e94f70fbabf9d8d44bb77820d3a3295 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 25 Jul 2024 10:34:47 +0200 Subject: [PATCH] Docs for print (#1001) * Docs for print * typo * missing comma --- R/format_parameters.R | 2 +- R/print.compare_parameters.R | 3 ++- R/print.parameters_model.R | 6 ++++++ man/display.parameters_model.Rd | 3 ++- man/format_parameters.Rd | 2 +- man/model_parameters.Rd | 5 ++++- man/print.compare_parameters.Rd | 6 +++++- man/print.parameters_model.Rd | 8 ++++++-- 8 files changed, 27 insertions(+), 8 deletions(-) diff --git a/R/format_parameters.R b/R/format_parameters.R index 33c508e4f..c9f5851da 100644 --- a/R/format_parameters.R +++ b/R/format_parameters.R @@ -11,7 +11,7 @@ #' @section Interpretation of Interaction Terms: #' Note that the *interpretation* of interaction terms depends on many #' characteristics of the model. The number of parameters, and overall -#' performance of the model, can differ *or not* between `a * b` +#' performance of the model, can differ *or not* between `a * b`, #' `a : b`, and `a / b`, suggesting that sometimes interaction terms #' give different parameterizations of the same model, but other times it gives #' completely different models (depending on `a` or `b` being factors diff --git a/R/print.compare_parameters.R b/R/print.compare_parameters.R index 61cf91560..7d058267f 100644 --- a/R/print.compare_parameters.R +++ b/R/print.compare_parameters.R @@ -78,7 +78,8 @@ print.compare_parameters <- function(x, ci_brackets = ci_brackets, format = "text", groups = groups, - zap_small = zap_small + zap_small = zap_small, + ... ) # if we have multiple components, we can align colum width across components here diff --git a/R/print.parameters_model.R b/R/print.parameters_model.R index 58fa5a213..96dfe89ff 100644 --- a/R/print.parameters_model.R +++ b/R/print.parameters_model.R @@ -92,6 +92,8 @@ #' categorical predictors. The coefficient for the reference level is always #' `0` (except when `exponentiate = TRUE`, then the coefficient will be `1`), #' so this is just for completeness. +#' @param ... Arguments passed down to [`format.parameters_model()`], +#' [`insight::format_table()`] and [`insight::export_table()`] #' @inheritParams insight::format_table #' @inheritParams compare_parameters #' @inheritParams display.parameters_model @@ -142,6 +144,10 @@ #' the default HTML engine for tables to `gt`, i.e. the _gt_ package is used to #' create HTML tables. If set to `tt`, the _tinytable_ package is used. #' +#' - `insight_use_symbols`: `options(insight_use_symbols = TRUE)` will try to +#' print unicode-chars for symbols as column names, wherever possible (e.g., +#' \ifelse{html}{\out{ω}}{\eqn{\omega}} instead of `Omega`). +#' #' @details `summary()` is a convenient shortcut for #' `print(object, select = "minimal", show_sigma = TRUE, show_formula = TRUE)`. #' diff --git a/man/display.parameters_model.Rd b/man/display.parameters_model.Rd index 0ae40397a..c7ef7f915 100644 --- a/man/display.parameters_model.Rd +++ b/man/display.parameters_model.Rd @@ -175,7 +175,8 @@ so this is just for completeness.} \item{verbose}{Toggle messages and warnings.} -\item{...}{Arguments passed to or from other methods.} +\item{...}{Arguments passed down to \code{\link[=format.parameters_model]{format.parameters_model()}}, +\code{\link[insight:format_table]{insight::format_table()}} and \code{\link[insight:export_table]{insight::export_table()}}} \item{sort}{Sort the loadings.} diff --git a/man/format_parameters.Rd b/man/format_parameters.Rd index 05a5dc25f..08f65b89d 100644 --- a/man/format_parameters.Rd +++ b/man/format_parameters.Rd @@ -28,7 +28,7 @@ to make them more human-readable. Note that the \emph{interpretation} of interaction terms depends on many characteristics of the model. The number of parameters, and overall -performance of the model, can differ \emph{or not} between \code{a * b} +performance of the model, can differ \emph{or not} between \code{a * b}, \code{a : b}, and \code{a / b}, suggesting that sometimes interaction terms give different parameterizations of the same model, but other times it gives completely different models (depending on \code{a} or \code{b} being factors diff --git a/man/model_parameters.Rd b/man/model_parameters.Rd index 74d40b89b..d435a4ccf 100644 --- a/man/model_parameters.Rd +++ b/man/model_parameters.Rd @@ -325,7 +325,7 @@ which is converted into a p-value using \code{\link[bayestestR:pd_to_p]{bayestes Note that the \emph{interpretation} of interaction terms depends on many characteristics of the model. The number of parameters, and overall -performance of the model, can differ \emph{or not} between \code{a * b} +performance of the model, can differ \emph{or not} between \code{a * b}, \code{a : b}, and \code{a / b}, suggesting that sometimes interaction terms give different parameterizations of the same model, but other times it gives completely different models (depending on \code{a} or \code{b} being factors @@ -377,6 +377,9 @@ options. \item \code{easystats_html_engine}: \code{options(easystats_html_engine = "gt")} will set the default HTML engine for tables to \code{gt}, i.e. the \emph{gt} package is used to create HTML tables. If set to \code{tt}, the \emph{tinytable} package is used. +\item \code{insight_use_symbols}: \code{options(insight_use_symbols = TRUE)} will try to +print unicode-chars for symbols as column names, wherever possible (e.g., +\ifelse{html}{\out{ω}}{\eqn{\omega}} instead of \code{Omega}). } } diff --git a/man/print.compare_parameters.Rd b/man/print.compare_parameters.Rd index c09b5a9b4..7adb416bc 100644 --- a/man/print.compare_parameters.Rd +++ b/man/print.compare_parameters.Rd @@ -169,7 +169,8 @@ is used for printing to HTML or markdown. Not all \code{print()} methods support the \code{"tt"} engine yet. If a specific \code{print()} method has no \code{engine} argument, \code{insight::export_table()} is used, which uses \emph{gt} for HTML printing.} -\item{...}{Arguments passed to or from other methods.} +\item{...}{Arguments passed down to \code{\link[=format.parameters_model]{format.parameters_model()}}, +\code{\link[insight:format_table]{insight::format_table()}} and \code{\link[insight:export_table]{insight::export_table()}}} \item{caption}{Table caption as string. If \code{NULL}, depending on the model, either a default caption or no table caption is printed. Use \code{caption = ""} @@ -242,6 +243,9 @@ options. \item \code{easystats_html_engine}: \code{options(easystats_html_engine = "gt")} will set the default HTML engine for tables to \code{gt}, i.e. the \emph{gt} package is used to create HTML tables. If set to \code{tt}, the \emph{tinytable} package is used. +\item \code{insight_use_symbols}: \code{options(insight_use_symbols = TRUE)} will try to +print unicode-chars for symbols as column names, wherever possible (e.g., +\ifelse{html}{\out{ω}}{\eqn{\omega}} instead of \code{Omega}). } } diff --git a/man/print.parameters_model.Rd b/man/print.parameters_model.Rd index 1b813fb66..e3618d06e 100644 --- a/man/print.parameters_model.Rd +++ b/man/print.parameters_model.Rd @@ -194,7 +194,8 @@ categorical predictors. The coefficient for the reference level is always \code{0} (except when \code{exponentiate = TRUE}, then the coefficient will be \code{1}), so this is just for completeness.} -\item{...}{Arguments passed to or from other methods.} +\item{...}{Arguments passed down to \code{\link[=format.parameters_model]{format.parameters_model()}}, +\code{\link[insight:format_table]{insight::format_table()}} and \code{\link[insight:export_table]{insight::export_table()}}} \item{caption}{Table caption as string. If \code{NULL}, depending on the model, either a default caption or no table caption is printed. Use \code{caption = ""} @@ -283,6 +284,9 @@ options. \item \code{easystats_html_engine}: \code{options(easystats_html_engine = "gt")} will set the default HTML engine for tables to \code{gt}, i.e. the \emph{gt} package is used to create HTML tables. If set to \code{tt}, the \emph{tinytable} package is used. +\item \code{insight_use_symbols}: \code{options(insight_use_symbols = TRUE)} will try to +print unicode-chars for symbols as column names, wherever possible (e.g., +\ifelse{html}{\out{ω}}{\eqn{\omega}} instead of \code{Omega}). } } @@ -290,7 +294,7 @@ create HTML tables. If set to \code{tt}, the \emph{tinytable} package is used. Note that the \emph{interpretation} of interaction terms depends on many characteristics of the model. The number of parameters, and overall -performance of the model, can differ \emph{or not} between \code{a * b} +performance of the model, can differ \emph{or not} between \code{a * b}, \code{a : b}, and \code{a / b}, suggesting that sometimes interaction terms give different parameterizations of the same model, but other times it gives completely different models (depending on \code{a} or \code{b} being factors