dot-process_denominator: Process 'denominator' Argument

.process_denominatorR Documentation

Process denominator Argument

Description

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.

Usage

.process_denominator(data, variables, denominator, by, strata)

Arguments

data

(data.frame)
a data frame

variables

(tidy-select)
columns to include in summaries. Default is everything().

denominator

(data.frame, integer)
Specify this optional argument to change the denominator, e.g. the "N" statistic. Default is NULL. See below for details.

by, strata

(tidy-select)
columns to tabulate by/stratify by for tabulation. 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.

strata: results are tabulated by all observed combinations of the columns specified.

Arguments may be used in conjunction with one another.

Value

a data frame

Examples

cards:::.process_denominator(mtcars, denominator = 1000, variables = "cyl", by = "gear")

cards documentation built on Oct. 4, 2024, 1:09 a.m.