I came across a solution for how to map non factorial data into a correlation matrix in which the solution uses an argument ~0+.
. For reference, here's the code :
model.matrix(~0+., data=df) %>%
cor(use="pairwise.complete.obs") %>%
ggcorrplot(show.diag = F, type="lower", lab=TRUE, lab_size=2)
What does the object ~0+. do in this scenario?
I tried looking up the meaning of the operator ~ and tried to make sense of the formula but I cannot understand how it this formula helping us create a mapping of factors.