Вы можете попробовать мой пакет expss
. Решение не настолько совершенное, но помогает мне во многих случаях:
library(corrplot)
library(expss)
data(iris)
iris2 = iris[,-5] # drop 'Species' - factor variable
# apply labels
var_lab(iris2$Sepal.Length) = "Sepal Length"
var_lab(iris2$Sepal.Width) = "Sepal Width"
var_lab(iris2$Petal.Length) = "Petal Length"
var_lab(iris2$Petal.Width) = "Petal Width"
# for each variables add variable name to label
for (each in colnames(iris2)){
var_lab(iris2[[each]]) = paste(each, var_lab(iris2[[each]]))
}
# replace names with labels and build correlation matrix
cor.mat = cor(names2labels(iris2))
corrplot(cor.mat, type="upper", order="hclust",
tl.col="black", tl.srt=45)