powered by
Output frequencies cross tabulated with a grouping column
tab_counts_one_grouped( data, col, cross, prop = "total", percent = TRUE, values = c("n", "p"), labels = TRUE, clean = TRUE, ... )
A volker tibble.
A tibble.
The column holding factor values.
The column holding groups to split.
The basis of percent calculation: "total" (the default), "cols", or "rows".
Proportions are formatted as percent by default. Set to FALSE to get bare proportions.
The values to output: n (frequency) or p (percentage) or both (the default).
If TRUE (default) extracts labels from the attributes, see codebook.
Prepare data by data_clean.
Placeholder to allow calling the method with unused parameters from tab_counts.
library(volker) data <- volker::chatgpt tab_counts_one_grouped(data, adopter, sd_gender)
Run the code above in your browser using DataLab