Within-group correlations
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?
- highlight.group
Characater. What group should be highlighted on graph?
Prints correlations in console, and plots in a graph.