afun_riskdiff | R Documentation |
In the risk difference column, this function uses the statistics function associated with afun
to
calculates risk difference values from arm X (reference group) and arm Y. These arms are specified
when configuring the risk difference column which is done using the add_riskdiff()
split function in
the previous call to rtables::split_cols_by()
. For all other columns, applies afun
as usual. This
function utilizes the stat_propdiff_ci()
function to perform risk difference calculations.
afun_riskdiff(
df,
labelstr = "",
.var,
.N_col,
.N_row,
.df_row,
.spl_context,
.all_col_counts,
.stats,
.formats = NULL,
.labels = NULL,
.indent_mods = NULL,
na_str = default_na_str(),
afun,
s_args = list()
)
df |
( |
labelstr |
( |
.var |
( |
.N_col |
( |
.N_row |
( |
.df_row |
( |
.spl_context |
( |
.all_col_counts |
( |
.stats |
( |
.formats |
(named |
.labels |
(named |
.indent_mods |
(named |
na_str |
( |
afun |
(named |
s_args |
(named |
A list of formatted rtables::CellValue()
.
stat_propdiff_ci()
for details on risk difference calculation.
Split function add_riskdiff()
which, when used as split_fun
within rtables::split_cols_by()
with
riskdiff
argument set to TRUE
in subsequent analyze functions calls, adds a risk difference column
to a table layout.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.