# NOT RUN {
# Compute correlation matrix
#::::::::::::::::::::::::::::::::::::::::::
cor.mat <- mtcars %>%
select(mpg, disp, hp, drat, wt, qsec) %>%
cor_mat()
# Subsetting correlation matrix
#::::::::::::::::::::::::::::::::::::::::::
# Select some variables of interest
cor.mat %>%
cor_select(mpg, drat, wt)
# Remove variables
cor.mat %>%
cor_select(-mpg, -wt)
# }
Run the code above in your browser using DataLab