powered by
denominator
Function takes the ard_categorical(denominator) argument and returns a structured data frame that is merged with the count data and used as the denominator in percentage calculations.
ard_categorical(denominator)
.process_denominator(data, variables, denominator, by, strata)
a data frame
(data.frame) a data frame
data.frame
(tidy-select) columns to include in summaries. Default is everything().
tidy-select
everything()
(string, data.frame, integer) Specify this argument to change the denominator, e.g. the "N" statistic. Default is 'column'. See below for details.
string
integer
"N"
'column'
(tidy-select) columns to use for grouping or stratifying the table output. Arguments are similar, but with an important distinction:
by: results are tabulated by all combinations of the columns specified, including unobserved combinations and unobserved factor levels.
by
strata: results are tabulated by all observed combinations of the columns specified.
strata
Arguments may be used in conjunction with one another.
cards:::.process_denominator(mtcars, denominator = 1000, variables = "cyl", by = "gear")
Run the code above in your browser using DataLab