Learn R Programming

descriptr (version 0.6.1)

ds_group_summary_interact: Category wise descriptive statistics

Description

Descriptive statistics of a continuous variable for the combination of levels of two or more categorical variables.

Usage

ds_group_summary_interact(data, col, ...)

Arguments

data

A data.frame or a tibble.

col

Column in data; continuous variable.

...

Columns in data; categorical variables.

Details

Character grouping columns are accepted and treated as factors. Factor levels may contain any character, including . and \r. Groups are formed from the values of the grouping columns themselves, so distinct combinations that would serialize to the same character string are never merged. Rows with a missing value in any of the selected columns are excluded.

The grouping columns keep their names in the returned tibble. If a grouping column is named like one of the statistic columns, such as mean, its column is suffixed with _group so that every column name is unique and the statistic keeps its documented name.

See Also

ds_group_summary

Examples

Run this code
ds_group_summary_interact(mtcarz, mpg, cyl, gear)

Run the code above in your browser using DataLab