View source: R/summary_table.R
summary_table | R Documentation |
Make a table of several summary statistics with proper formatting.
summary_table(
mean,
var,
quant,
ic95 = NULL,
prop0 = NULL,
prop1 = NULL,
label,
digits = 2,
...
)
mean |
Real. |
var |
Real. |
quant |
Named numeric vector. Names must be of the form "xx
numeric xx. As from the output of the function |
ic95 |
Numeric vector. |
prop0 |
Real. |
prop1 |
Real. |
label |
Character. Name of the summarised variable. |
digits |
Integer. Number of decimal places to be used. |
... |
Passed to knitr::kable(). |
The table includes the mean, variance and standard deviation, a vector of 3 quantiles at 0.05, 0.50 and 0.95, a 95 numeric value to be interpreted as a proportion above 0 and 1. All values are rounded to the specified number of decimal places.
A knitr_kable object.
summary_table(mean = 1, var = 1, quant = quantile(1:10, 0:4/4), ic95 = 4:5,
prop1 = .6, label = "test")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.