I want to use R to visualise and calculate the correlation of one variable data to many other variables data[2:96]
I am already aware of what packages such as psych and PerformanceAnalytics have the Pairs function.
Ideally, I would like to output a graph like that Pairs outputs, but only for the correlations between data and each of data[2:96], not for each of the elements of data[1:96] with itself, that would take up too much space. Any ideas on this would be appreciated.
mtcars data and the
install.packages("corrplot") library(corrplot) mcor <- cor(x = mtcars$mpg, y = mtcars[2:11], use="complete.obs") corrplot(mcor, tl.srt = 25)
Edit: Forgot to put in a vignette for
corrplot showing more ways to format it: https://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html