ggstatsplot (version 0.6.5)

grouped_proptest: Function to run proportion test on grouped data.

Description

Function to run proportion test on grouped data.

Usage

grouped_proptest(data, grouping.vars, measure, ...)

Arguments

data

Dataframe (or tibble) from which variables are to be taken.

grouping.vars

Grouping variables.

measure

A variable for which proportion test needs to be carried out for each combination of levels of factors entered in grouping.vars.

...

Currently ignored.

Value

Dataframe with percentages and statistical details from a proportion test.

Examples

Run this code
# NOT RUN {
# for reproducibility
set.seed(123)

ggstatsplot:::grouped_proptest(
  data = mtcars,
  grouping.vars = cyl,
  measure = am
)
# }

Run the code above in your browser using DataLab