# Data preparation
#::::::::::::::::::::::::::::::::::::::::::
mydata <- mtcars %>%
select(mpg, disp, hp, drat, wt, qsec)
head(mydata, 3)
# Compute correlation matrix and pull triangles
#::::::::::::::::::::::::::::::::::::::::::
# Correlation matrix
cor.mat <- cor_mat(mydata)
cor.mat
# Pull lower triangular part
cor.mat %>% pull_lower_triangle()
# Pull upper triangular part
cor.mat %>% pull_upper_triangle()
Run the code above in your browser using DataLab