0

我尝试创建一个闪亮的应用程序来打印具有层次聚类的 pca ggplot 并出现以下错误:警告:错误:您正在将函数作为全局数据传递。你是不是把data论点拼错了ggplot()。可能是什么问题呢?这是服务器:


    
    palette(c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3",
             "#FF7F00", "#FFFF33", "#A65628", "#F781BF", "#999999"))
    
    ggplot(swissDf, aes(x=PC1, y=PC2)) +
      theme_classic() +
      geom_hline(yintercept = 0, color = "gray70") +
      geom_vline(xintercept = 0, color = "gray70") +
      geom_point(aes(color = cluster), alpha = 0.55, size = 3) +
      xlab("PC1") +
      ylab("PC2") + 
      
      ggtitle("PCA Clusters from Hierarchical Clustering of Cars Data")
    
    })
  
}



shinyApp(ui, server)

4

0 回答 0