Learn R Programming

volker (version 3.1.0)

tab_counts_one_cor: Count values by a metric column that will be split into groups

Description

Count values by a metric column that will be split into groups

Usage

tab_counts_one_cor(
  data,
  col,
  cross,
  prop = "total",
  percent = TRUE,
  values = c("n", "p"),
  labels = TRUE,
  clean = TRUE,
  ...
)

Value

A volker tibble.

Arguments

data

A tibble.

col

The column holding factor values.

cross

The metric column that will be split into groups at the median.

prop

The basis of percent calculation: "total" (the default), "cols", or "rows".

percent

Proportions are formatted as percent by default. Set to FALSE to get bare proportions.

values

The values to output: n (frequency) or p (percentage) or both (the default).

labels

If TRUE (default) extracts labels from the attributes, see codebook.

clean

Prepare data by data_clean.

...

Placeholder to allow calling the method with unused parameters from tab_counts.

Examples

Run this code
library(volker)
data <- volker::chatgpt

tab_counts_one_cor(data, adopter, sd_age)

Run the code above in your browser using DataLab