【发布时间】:2020-08-26 06:07:47
【问题描述】:
当我使用fviz_contrib 绘制factoextra 包中列元素的贡献时,默认的y 标签是Contributions (%),我想知道如何更改为其他文本。
我使用了以下代码:
library(factoextra)
library(FactoMineR)
# Principal component analysis
# ++++++++++++++++++++++++++
data(decathlon2)
decathlon2.active <- decathlon2[1:23, 1:10]
res.pca <- prcomp(decathlon2.active, scale = TRUE)
# variable contributions on axis 1
fviz_contrib(res.pca, choice="var", axes = 1, top = 10, ylab = 'my label y' )
但是,它提示了我
ggpubr::ggbarplot(df, x = "name", y = "contrib", fill = fill, 中的错误: 由多个实际参数匹配的形式参数“ylab”
如何解决?
谢谢。
【问题讨论】: