stat_two_cat: Summary table for comparative analysis between two...

View source: R/stat_two_cat.r

stat_two_catR Documentation

Summary table for comparative analysis between two categorical variables

Description

Create a frequency table with chi-square statistic, p-value, cramer's v.

Usage

stat_two_cat(df, grp_var, vars, filter = "")

Arguments

df

A single data.frame

grp_var

A character variable from a data.frame

vars

One or more variables from a data.frame

filter

A character single value (default = ”), that will be the value to filter the variables

Value

A gt table.

Examples



mtcars %>%
 dplyr::mutate(vs = paste0("vs = ",vs)) %>%
 stat_two_cat(grp_var = vs,vars = c(am,cyl))

vbfelix/relper documentation built on Jan. 28, 2025, 12:15 p.m.