I have a classical linear model y ~ x1 + x2. How can I plot a heatmap of this model? Normally I print a heatmap from data in this way:
library(pheatmap)
data <- data.frame(y=c(1,2,3), x1=c(1.5,2,2.5), x2=c(3,10,12))
pheatmap(cor(data), scale="none")
But in this case I want to see the effect of y on x1 and x2. So I need a heatmap with a covariate for y. Something like this:
pheatmap(cor(select(data,-c(y))), scale="none", covariate=y)
But i didn't find a correct syntax for y as covariate. Please help me.