# NOT RUN {
# Compute correlation matrix
#::::::::::::::::::::::::::::::::::::::::::
cor.mat <- mtcars %>%
select(mpg, disp, hp, drat, wt, qsec) %>%
cor_mat()
# Reorder by correlation and get p-values
#::::::::::::::::::::::::::::::::::::::::::
# Reorder
cor.mat %>%
cor_reorder()
# Get p-values of the reordered cor_mat
cor.mat %>%
cor_reorder() %>%
cor_get_pval()
# }
Run the code above in your browser using DataLab