【问题标题】:ggbiplot worked previously with prcomp, now will notggbiplot 以前与 prcomp 一起工作,现在不会
【发布时间】:2019-03-24 06:26:43
【问题描述】:

ggbiplot 过去使用prcomp 没有问题,但现在不行。我收到的只是以下错误代码:

绘图标签中的错误(p = p,数据 = plot.data,标签 = 标签,标签.标签 = 标签.标签,: 不支持的类:prcomp

我已经使用dependencies=TRUE 安装了ggbiplot,其他所有关于类似问题的帖子都已完成,但我仍然收到此消息。

感谢任何帮助。

mypca <- prcomp(mydata, center=TRUE, scale.=TRUE)
ggbiplot(mypca, center=TRUE, scale.=TRUE)

绘图标签中的错误(p = p,数据 = plot.data,标签 = 标签,标签.标签 = 标签.标签,: 不支持的类:prcomp

【问题讨论】:

    标签: r ggbiplot prcomp


    【解决方案1】:

    我不认为 ggbiplotcenterscale. 参数。您是否将 prcompggbiplot 函数参数混淆了?

    以下工作正常:

    library(ggbiplot)
    pca <- prcomp(USArrests, center = TRUE, scale. = TRUE)
    ggbiplot(pca)
    

    ggbiplot_0.55 上测试。

    【讨论】:

      【解决方案2】:

      试试,

      ggbiplot::ggbiplot(mypca) 
      

      【讨论】:

        猜你喜欢
        • 2015-01-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-05-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多