Skip to contents

Prints correlations in console, and optionally plots in a graph.

Usage

cor_within(
  var1,
  var2,
  group,
  data,
  plot = TRUE,
  labs = TRUE,
  use = "pairwise",
  highlight.group = NA
)

Arguments

var1

String. Name of variable to correlate.

var2

String. Name of variable to correlate.

group

Grouping variable.

data

Data.framer containing var1, var2, and group.

plot

Logical. Should the plot be created?

labs

Logical. Should value labels be used?

use

Character. Passed to `cor.test`, how to handle missing values.

highlight.group

Characater. What group should be highlighted on graph?