Learn R Programming

volker (version 2.1.0)

tab_metrics_items_cor: Output a correlation table for item battery and one metric variable

Description

[Experimental]

Usage

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

Value

A volker tibble.

Arguments

data

A tibble.

cols

The source columns.

cross

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

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.

Examples

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

tab_metrics_items_cor(
  data,
  starts_with("cg_adoption_adv"),
  sd_age,
  metric = TRUE
)

Run the code above in your browser using DataLab