Description Usage Arguments Details Value Methods (by class)
This is a function created to provide characteristics of a study group with an option to stratify by some variable (usually an exposure) The output of this function is designed to be used with pander in rmarkdown, but all row name formatting can be removed with the option: emphasis = 'n'.
1 2 3 4 5 6 7 |
data |
the data frame or design object of the data you which to characterize |
... |
Arguments passed through methods to table 1. |
rowvars |
A vector of row positions or names. |
colvar |
The position or name of the variable to stratify by, set
to |
sigfig |
The number of significant digits to use for mean, sd, median, and IQR. |
rowvar_names |
An optional vector of row names to be used for variables. Must be the same length and in the same order as rowvars. |
incl_missing |
Set to |
incl_pvalues |
Set to |
emphasis |
Set to |
MedIQR |
optional vector of continuous variables to return median and IQR instead of mean and SD. |
asTable |
should a table ( |
lineBreaks |
should the N be printed on a seperate line from the
categories. default is |
tight |
if |
verbose |
should both levels of binary variables be printed. |
Only the 1st factor of binary categorical variables is displayed. All determinations of categorical, binary, or continuous are performed automatically. Character variables are converted to factors. Variables are displayed in the following order: binary, non-binary categorical, continuous, and integers + continuous variables with median and IQR. If no stratification variable is provided, summary statistics on the entire sample are provided. No p-values can be provided in this case. If a design object is passed in lieu of a data frame, weighted numbers using the survey package are provided. (The survey package must be installed in this case.)
To use the lineBreaks use panderOptions('keep.line.breaks', TRUE)
a table/matrix with N and percentages for categorical variables, mean and sd for continuous ones, and median and 25th and 75th percentile for integers. If variables are passed via the MedIQR argument, median and 25th and 75th percentile is calculated instead for those variable.
data.frame
: unweighted table 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.