I have a large dataset with different numeric and factorial data. Doing a correlation plot with ggcorr(data) gives me an interesting graph, but half of it is useless to me because I just need to correlate between the descriptive and measures data. There would give a 5*4 square instead of a triangle with a length of 9 with my data. Is there a way to do this? And is there a way to add the P values as stars?
A short dataset which looks similar to mine:
State <-as.factor(c("land", "loc2", "loc2", "loc3"))
Age <- c(20, 24, 22, 49)
Education<- as.factor(c(2, 2, 3, 1))
AreaHill <- c(NA, 22, 18, 2)
AreaPlain <-c(1, 3, NA, NA)
Style <-as.factor(c("s2", "s3", "s2", "s2"))
descriptive <-cbind(State, Age, Education, AreaHill, AreaPlain, Style)
Measure1 <-c(2, 4, 2, 2)
Measure2 <-c(4, 4, 2, 5)
Measure3 <-c(2, 3, 1, 1)
Measure4 <-c(2, 1, 2, 2)
measures <- cbind(Measure1, Measure2, Measure3, Measure4)
data <- cbind(State, Age, Education, AreaHill, AreaPlain, Style, Measure1, Measure2, Measure3, Measure4)
library(GGally)
ggcorr(data)
``` Here is what I have so far
[The correlations now, as a triangle][1]
and here is what I want to have: correlations between categories, but not among them, as well as the p. value as a star (or anything else).
[The potential image with correlation between some categories but without correlation among them][2]
[1]: https://i.stack.imgur.com/a5Uib.jpg
[2]: https://i.stack.imgur.com/cLUSP.jpg