Learn R Programming

volker (version 3.2.0)

plot_counts_items_grouped_items: Correlation of categorical items with categorical items

Description

Correlation of categorical items with categorical items

Usage

plot_counts_items_grouped_items(
  data,
  cols,
  cross,
  method = "cramer",
  category = NULL,
  title = TRUE,
  labels = TRUE,
  clean = TRUE,
  ...
)

Value

A ggplot object.

Arguments

data

A tibble containing item measures.

cols

Tidyselect item variables (e.g. starts_with...).

cross

Tidyselect item variables (e.g. starts_with...).

method

The method of correlation calculation:

  • cramer for Cramer's V,

  • npmi for Normalized Pointwise Mutual Information.

title

If TRUE (default) shows a plot title derived from the column labels. Disable the title with FALSE or provide a custom title as character value.

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

Examples

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

plot_counts_items_grouped_items(
  data,
  starts_with("cg_adoption_advantage"),
  starts_with("cg_adoption_fearofuse"),
  method ="cramer"
)

Run the code above in your browser using DataLab