# load libraries for models and data
library(Hmisc)
mat <- replicate(52, rnorm(100))
# add some NAs
mat[sample(length(mat), 2000)] <- NA
# also, column names
colnames(mat) <- c(LETTERS, letters)
# fit model
rc <- rcorr(mat)
# summarize model fit with tidiers + visualization
td <- tidy(rc)
td
library(ggplot2)
ggplot(td, aes(p.value)) +
geom_histogram(binwidth = .1)
ggplot(td, aes(estimate, p.value)) +
geom_point() +
scale_y_log10()
Run the code above in your browser using DataLab