Description Usage Arguments Value Examples
Table one is a tabular description of characteristics, e.g., demographics of patients in a clinical trial, presented overall and also stratified by a categorical variable, e.g. treatment group.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
data |
a data frame |
formula |
an optional formula object. The left hand side of the formula should be blank. The right hand side of the formula should contain row variables for the table. The '|' symbol can be used to include stratifying variables. If this option is used, no more than two stratifying variables should be used, and they must be separated by a * symbol. If formula is used, the strat, by, and row_vars inputs are ignored. |
meta_data |
a meta data frame. If unspecified, a meta data frame
will be created using |
row_vars |
a character vector indicating column names of row variables in the table. If unspecified, all columns are used. |
strat |
a character value indicating the column name in data that will be used to stratify the table |
by |
a character value indicating the column name in data that will be used to split the table into groups, prior to stratification. |
specs_table_vals |
named vector of character values. Names should be variables, while values should be specs. Valid specs are 'mean' and 'median' (see examples). |
specs_table_tests |
named vector of character values. Names should be variables, while values should be specs. Valid specs are 'params' or 'noparm' (see examples). |
include_pval |
T/F, should the table include a column for p-values? If p-values are included, factor variables are handled using chi-square tests, continuous variables are handled using t-tests or ANOVA, depending on the number of categories in the table stratification. |
expand_binary_catgs |
T/F, should all categories be included for binary categorical variables? (This only applies to binary variables.) |
include_freq |
T/F, should frequency values be included for categorical variables? |
add_perc_to_cats |
T/F, should categorical variable labels be appended with a percent sign? |
a tibble containing summary values
that describe characteristics of observations in data
, which can
subsequently be sent to different modes of output
(see to_word and to_kable).
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.