display.parameters_model | R Documentation |
Prints tables (i.e. data frame) in different output formats.
print_md()
is a alias for display(format = "markdown")
.
## S3 method for class 'parameters_model'
display(
object,
format = "markdown",
pretty_names = TRUE,
split_components = TRUE,
select = NULL,
caption = NULL,
subtitle = NULL,
footer = NULL,
align = NULL,
digits = 2,
ci_digits = digits,
p_digits = 3,
footer_digits = 3,
ci_brackets = c("(", ")"),
show_sigma = FALSE,
show_formula = FALSE,
zap_small = FALSE,
font_size = "100%",
line_padding = 4,
column_labels = NULL,
include_reference = FALSE,
verbose = TRUE,
...
)
## S3 method for class 'parameters_sem'
display(
object,
format = "markdown",
digits = 2,
ci_digits = digits,
p_digits = 3,
ci_brackets = c("(", ")"),
...
)
## S3 method for class 'parameters_efa_summary'
display(object, format = "markdown", digits = 3, ...)
## S3 method for class 'parameters_efa'
display(
object,
format = "markdown",
digits = 2,
sort = FALSE,
threshold = NULL,
labels = NULL,
...
)
## S3 method for class 'equivalence_test_lm'
display(object, format = "markdown", digits = 2, ...)
## S3 method for class 'parameters_model'
format(
x,
pretty_names = TRUE,
split_components = TRUE,
select = NULL,
digits = 2,
ci_digits = digits,
p_digits = 3,
ci_width = NULL,
ci_brackets = NULL,
zap_small = FALSE,
format = NULL,
groups = NULL,
include_reference = FALSE,
...
)
## S3 method for class 'parameters_model'
print_html(
x,
pretty_names = TRUE,
split_components = TRUE,
select = NULL,
caption = NULL,
subtitle = NULL,
footer = NULL,
align = NULL,
digits = 2,
ci_digits = digits,
p_digits = 3,
footer_digits = 3,
ci_brackets = c("(", ")"),
show_sigma = FALSE,
show_formula = FALSE,
zap_small = FALSE,
groups = NULL,
font_size = "100%",
line_padding = 4,
column_labels = NULL,
include_reference = FALSE,
verbose = TRUE,
...
)
## S3 method for class 'parameters_model'
print_md(
x,
pretty_names = TRUE,
split_components = TRUE,
select = NULL,
caption = NULL,
subtitle = NULL,
footer = NULL,
align = NULL,
digits = 2,
ci_digits = digits,
p_digits = 3,
footer_digits = 3,
ci_brackets = c("(", ")"),
show_sigma = FALSE,
show_formula = FALSE,
zap_small = FALSE,
groups = NULL,
include_reference = FALSE,
verbose = TRUE,
...
)
object |
An object returned by |
format |
String, indicating the output format. Can be |
pretty_names |
Can be |
split_components |
Logical, if |
select |
Determines which columns and and which layout columns are printed. There are three options for this argument:
For |
caption |
Table caption as string. If |
subtitle |
Table title (same as caption) and subtitle, as strings. If |
footer |
Can either be |
align |
Only applies to HTML tables. May be one of |
digits, ci_digits, p_digits |
Number of digits for rounding or
significant figures. May also be |
footer_digits |
Number of decimal places for values in the footer summary. |
ci_brackets |
Logical, if |
show_sigma |
Logical, if |
show_formula |
Logical, if |
zap_small |
Logical, if |
font_size |
For HTML tables, the font size. |
line_padding |
For HTML tables, the distance (in pixel) between lines. |
column_labels |
Labels of columns for HTML tables. If |
include_reference |
Logical, if |
verbose |
Toggle messages and warnings. |
... |
Arguments passed to or from other methods. |
sort |
Sort the loadings. |
threshold |
A value between 0 and 1 indicates which (absolute) values
from the loadings should be removed. An integer higher than 1 indicates the
n strongest loadings to retain. Can also be |
labels |
A character vector containing labels to be added to the loadings data. Usually, the question related to the item. |
x |
An object returned by |
ci_width |
Minimum width of the returned string for confidence
intervals. If not |
groups |
Named list, can be used to group parameters in the printed output.
List elements may either be character vectors that match the name of those
parameters that belong to one group, or list elements can be row numbers
of those parameter rows that should belong to one group. The names of the
list elements will be used as group names, which will be inserted as "header
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 |
display()
is useful when the table-output from functions,
which is usually printed as formatted text-table to console, should
be formatted for pretty table-rendering in markdown documents, or if
knitted from rmarkdown to PDF or Word files. See
vignette
for examples.
If format = "markdown"
, the return value will be a character
vector in markdown-table format. If format = "html"
, an object of
class gt_tbl
.
print.parameters_model()
model <- lm(mpg ~ wt + cyl, data = mtcars)
mp <- model_parameters(model)
display(mp)
data(iris)
lm1 <- lm(Sepal.Length ~ Species, data = iris)
lm2 <- lm(Sepal.Length ~ Species + Petal.Length, data = iris)
lm3 <- lm(Sepal.Length ~ Species * Petal.Length, data = iris)
out <- compare_parameters(lm1, lm2, lm3)
print_html(
out,
select = "{coef}{stars}|({ci})",
column_labels = c("Estimate", "95% CI")
)
# line break, unicode minus-sign
print_html(
out,
select = "{estimate}{stars}<br>({ci_low} \u2212 {ci_high})",
column_labels = c("Est. (95% CI)")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.