From 06ab47197df8293ad45dfdd80bde6749a2e14728 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 11 Sep 2023 16:07:10 +0200 Subject: [PATCH] docs --- R/display.R | 1 + R/print.parameters_model.R | 4 ++++ R/print_html.R | 2 ++ R/print_md.R | 2 ++ man/display.parameters_model.Rd | 13 ++++++++----- man/print.parameters_model.Rd | 5 +++-- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/R/display.R b/R/display.R index eb5af55fa..e9549821a 100644 --- a/R/display.R +++ b/R/display.R @@ -91,6 +91,7 @@ display.parameters_model <- function(object, font_size = "100%", line_padding = 4, column_labels = NULL, + add_reference = FALSE, verbose = TRUE, ...) { if (identical(format, "html")) { diff --git a/R/print.parameters_model.R b/R/print.parameters_model.R index ad073dc01..f0570b394 100644 --- a/R/print.parameters_model.R +++ b/R/print.parameters_model.R @@ -237,6 +237,7 @@ print.parameters_model <- function(x, groups = NULL, column_width = NULL, ci_brackets = c("[", "]"), + add_reference = FALSE, ...) { # save original input orig_x <- x @@ -286,6 +287,7 @@ print.parameters_model <- function(x, ci_brackets = ci_brackets, format = "text", groups = groups, + add_reference = add_reference, ... ) @@ -382,6 +384,7 @@ print.parameters_random <- function(x, digits = 2, ...) { ci_brackets = TRUE, format = "text", group = NULL, + add_reference = FALSE, ...) { format( x, @@ -396,6 +399,7 @@ print.parameters_random <- function(x, digits = 2, ...) { zap_small = zap_small, format = format, group = group, + add_reference = add_reference, ... ) } diff --git a/R/print_html.R b/R/print_html.R index aaec47d4d..5be9f9b98 100644 --- a/R/print_html.R +++ b/R/print_html.R @@ -22,6 +22,7 @@ print_html.parameters_model <- function(x, font_size = "100%", line_padding = 4, column_labels = NULL, + add_reference = FALSE, verbose = TRUE, ...) { # check if user supplied digits attributes @@ -82,6 +83,7 @@ print_html.parameters_model <- function(x, ci_brackets = ci_brackets, format = "html", groups = groups, + add_reference = add_reference, ... ) diff --git a/R/print_md.R b/R/print_md.R index ad0393cd8..d95e7fe58 100644 --- a/R/print_md.R +++ b/R/print_md.R @@ -19,6 +19,7 @@ print_md.parameters_model <- function(x, show_formula = FALSE, zap_small = FALSE, groups = NULL, + add_reference = FALSE, verbose = TRUE, ...) { # check if user supplied digits attributes @@ -66,6 +67,7 @@ print_md.parameters_model <- function(x, ci_brackets = ci_brackets, format = "markdown", groups = groups, + add_reference = add_reference, ... ) diff --git a/man/display.parameters_model.Rd b/man/display.parameters_model.Rd index 71cc9f6bf..0db3977c4 100644 --- a/man/display.parameters_model.Rd +++ b/man/display.parameters_model.Rd @@ -33,6 +33,7 @@ font_size = "100\%", line_padding = 4, column_labels = NULL, + add_reference = FALSE, verbose = TRUE, ... ) @@ -99,6 +100,7 @@ font_size = "100\%", line_padding = 4, column_labels = NULL, + add_reference = FALSE, verbose = TRUE, ... ) @@ -121,6 +123,7 @@ show_formula = FALSE, zap_small = FALSE, groups = NULL, + add_reference = FALSE, verbose = TRUE, ... ) @@ -233,6 +236,11 @@ places than \code{digits} are printed in scientific notation.} \item{column_labels}{Labels of columns for HTML tables. If \code{NULL}, automatic column names are generated. See 'Examples'.} +\item{add_reference}{Logical, if \code{TRUE}, the reference level of factors will +be added to the parameter table. This is only relevant for models with +categorical predictors. The coefficient for the reference level is always +\code{0}, so this is just for completeness.} + \item{verbose}{Toggle messages and warnings.} \item{...}{Arguments passed to or from other methods.} @@ -264,11 +272,6 @@ row". A possible use case might be to emphasize focal predictors and control variables, see 'Examples'. Parameters will be re-ordered according to the order used in \code{groups}, while all non-matching parameters will be added to the end.} - -\item{add_reference}{Logical, if \code{TRUE}, the reference level of factors will -be added to the parameter table. This is only relevant for models with -categorical predictors. The coefficient for the reference level is always -\code{0}, so this is just for completeness.} } \value{ If \code{format = "markdown"}, the return value will be a character diff --git a/man/print.parameters_model.Rd b/man/print.parameters_model.Rd index 576c53d80..a21228d7f 100644 --- a/man/print.parameters_model.Rd +++ b/man/print.parameters_model.Rd @@ -22,6 +22,7 @@ groups = NULL, column_width = NULL, ci_brackets = c("[", "]"), + add_reference = FALSE, ... ) @@ -131,12 +132,12 @@ columns across all table components are adjusted to have the same width.} \item{ci_brackets}{Logical, if \code{TRUE} (default), CI-values are encompassed in square brackets (else in parentheses).} -\item{...}{Arguments passed to or from other methods.} - \item{add_reference}{Logical, if \code{TRUE}, the reference level of factors will be added to the parameter table. This is only relevant for models with categorical predictors. The coefficient for the reference level is always \code{0}, so this is just for completeness.} + +\item{...}{Arguments passed to or from other methods.} } \value{ Invisibly returns the original input object.