Table one
create_table_one(df, numbers_as_categories = TRUE, deaths = NULL)create_contigency_table(df, x, max_size = 8, numbers_as_categories = TRUE, ...)
percentage_table(x, n_digits = 2)
data.frame
.
Whether numbers should be categorized.
The number of deaths in the population.
column vector name in df
.
maximum size of unique elements in the numeric variable x
before the values are clustered.
Arguments passed on to get_breaks
limits
axis limits. May be either a vector of 2 elements with lower and upper bounds, or a single number (which is the upper bound, the lower bound is then assumed to be 0).
N
step size. The eventual intervals will be multiples of the divisors of N
or
multiples of N
when multiples_only
is TRUE
. Defaults to 10.
max_breaks
maximum amount of breaks, defaults to 10.
int_only
whether only integer divisors of N
may be used as breaks, defaults to TRUE
.
multiples_only
whether only multiples of N
can be used as breaks, defaults to FALSE
.
include_bounds
whether the resulting breaks should encompass min
and max
. Defaults to TRUE
.
The number of digits to which the percentages are rounded.
A dataframe containing the contingency tables for each of the variables in df
.
A matrix with distinct (factor) labels and corresponding counts and percentages.