data(cor_example)
# Matrix dimensions
dim(cor_example)
# Visualize structure
if (requireNamespace("corrplot", quietly = TRUE)) {
corrplot::corrplot(cor_example, method = "color", type = "upper",
tl.col = "black", tl.cex = 0.7)
}
# Distribution of correlations
hist(cor_example[upper.tri(cor_example)],
breaks = 30,
main = "Distribution of Correlations in cor_example",
xlab = "Correlation",
col = "steelblue")
# Use with MatSelect
library(corrselect)
results <- MatSelect(cor_example, threshold = 0.7, method = "els")
show(results)
Run the code above in your browser using DataLab