shave: Shave off upper/lower triangle.

View source: R/internal.R

shaveR Documentation

Shave off upper/lower triangle.

Description

Convert the upper or lower triangle of a correlation data frame (cor_df) to missing values.

Usage

shave(x, upper = TRUE)

Arguments

x

cor_df. See correlate.

upper

Boolean. If TRUE, set upper triangle to NA; lower triangle if FALSE.

Value

cor_df. See correlate.

Examples

x <- correlate(mtcars)
shave(x) # Default; shave upper triangle
shave(x, upper = FALSE) # shave lower triangle

tidymodels/corrr documentation built on Jan. 27, 2024, 8:41 a.m.