Initializes a tangram.pipe
table by specifying the desired elements and data components.
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
)
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.
The dataset to be used in the table.
The variable to be used in the table columns. NULL if single summary column desired.
logical: if TRUE, missing data is considered; FALSE only uses complete cases.
logical: if TRUE, an overall column is included.
logical: if TRUE, a comparison test is conducted between columns.
The default number of digits to use in the table. By default, the package will use 2 significant digits.
The default summary function to use for numerical rows. By default, the package will use num_default()
, but the user can also choose num_minmax
, num_medianiqr
, num_mean_sd
, or write a custom function to use for the rows.
The default summary function to use for categorical rows. By default, the package will use cat_default()
, but the user can also choose cat_pct
or write a custom function to use for the rows.
The default summary function to use for binary rows. By default, the package will use binary_default()
, but the user can also choose binary_pct
or write a custom function to use for the rows.
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE)
Run the code above in your browser using DataLab