Counts number of groups across specified grouping and stratification variables in a data frame. At least one grouping or stratification variable must be provided.
number_of_strata(df, stratify_by)
Number of distinct strata in the data frame.
A data frame with grouping and/or stratification variables.
Variables in data frame that defines a stratification of the data.