Description Usage Arguments Details Value Examples
View source: R/prepapre_descriptive_table.R
Reads a data frame and reports descriptive statistics (n, mean, standard deviation, minimum, first quartile, median, third quartile, maximum) for all members of the data frame that are either numeric or logical.
1 2 3 4 5 | prepare_descriptive_table(
df,
digits = c(0, 3, 3, 3, 3, 3, 3, 3),
format = "html"
)
|
df |
Data frame containing at least one variable that is either numeric or logical and at least two observations. |
digits |
Number of decimal digits that you want to be displayed for each column. If you provide NA, then the column is omitted from the output. |
format |
character scalar that is handed over to |
The digits
parameter from prepare_descriptive_table()
uses the default method of
kable
to format numbers, calling round
. This implies that trailing zeroes are
just omitted.
A list containing two items.
A data frame containing the descriptive table
The return value provided by kable
containing the formatted table
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.