summ_cat: Summarise categorical variables

View source: R/fn_all.R

summ_catR Documentation

Summarise categorical variables

Description

Summarise all categorical variables. Numeric variables will be dropped.

Usage

summ_cat(d, ..., var, view = FALSE)

Arguments

d

⁠<dfr>⁠ A data frame.

...

⁠<var>⁠ Optional. Columns to summarise.

var

⁠<var/int>⁠ (name or index) Optional. A variable to extract as a data frame.

view

⁠<lgl>⁠ TRUE to show output as flextable.

Value

A list containing summaries for all categorical variables or a data frame showing the summary of a selected variable.

Examples

d = mtcars |> dplyr::mutate(dplyr::across(c(cyl,vs,am,gear,carb),factor))
d |> summ_cat()
d |> summ_cat(cyl,vs)
d |> summ_cat(var=cyl)
d |> summ_cat(var=1)

edar documentation built on Nov. 15, 2026, 1:07 a.m.