prepare_descriptive_table: Prepares a Table of Descriptive Statistics
Description
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.
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 kable
(e.g., "html" or "latex").
Value
A list containing two items.
"df"
A data frame containing the descriptive table
"kable_ret"
The return value provided by kable containing the formatted table
Details
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.