tab_metrics_items_cor {volker}R Documentation

Output a correlation table

Description

[Experimental]

Usage

tab_metrics_items_cor(
  data,
  cols,
  cross,
  negative = FALSE,
  method = "pearson",
  digits = 2,
  labels = TRUE,
  clean = TRUE,
  ...
)

Arguments

data

A tibble.

cols

The source columns.

cross

The target columns or NULL to calculate correlations within the source columns.

negative

If FALSE (default), negative values are recoded as missing values.

method

The output metrics, pearson = Pearson's R, spearman = Spearman's rho.

digits

The number of digits to print.

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_metrics.

Value

A volker tibble.

Examples

library(volker)
data <- volker::chatgpt

tab_metrics_items_cor(data, starts_with("cg_adoption_adv"), starts_with("use_"))


[Package volker version 2.0.1 Index]