Produce table of counts of outcome by variable, and percentage of full data within group.
table_np_outcome(
data,
outcome,
vars,
digits = 0,
np_only = TRUE,
var_col = FALSE
)Input dataset.
Binary variable with outcome as "1".
Character vector of variables to get counts and percentages for.
Number of digits to use after the decimal point in percentages.
Option to return only the combined count and percentage variable.
Option to include variable name as a separate column.
Data frame with counts and percentages of outcome for a list of variables.
if (FALSE) { # \dontrun{
table_np_outcome(data, outcome = "death", c("var1", "var2"))
} # }