tbl_start {tangram.pipe} | R Documentation |
Table Initialization
Description
Initializes a tangram.pipe
table by specifying the desired elements and data components.
Usage
tbl_start(
data,
col_var,
missing = FALSE,
overall = TRUE,
comparison = FALSE,
digits = 2,
default_num_summary = num_default,
default_cat_summary = cat_default,
default_binary_summary = binary_default
)
Arguments
data |
The dataset to be used in the table. |
col_var |
The variable to be used in the table columns. NULL if single summary column desired. |
missing |
logical: if TRUE, missing data is considered; FALSE only uses complete cases. |
overall |
logical: if TRUE, an overall column is included. |
comparison |
logical: if TRUE, a comparison test is conducted between columns. |
digits |
The default number of digits to use in the table. By default, the package will use 2 significant digits. |
default_num_summary |
The default summary function to use for numerical rows. By default, the package will use |
default_cat_summary |
The default summary function to use for categorical rows. By default, the package will use |
default_binary_summary |
The default summary function to use for binary rows. By default, the package will use |
Value
A list containing separate entries holding information provided in the function's arguments, as well as a calculated number of column categories to include for the initialized table.
Examples
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE)