我已经写了一个闪亮的应用程序,它可以正常运行而没有错误,但每次运行程序时,ggplot()都会在RStudio的查看器面板中绘制,但我希望它能够显示在主面板。如何在我的闪亮应用程序的主面板中切换和绘图?
在我的代码中,我的mainPanel不在我的sidebarPanel中,我的plotOutput被正确调用。
mainPanel(plotOutput("plot1"))
这是服务器对plot1的调用。我的所有数据框操作和ggplot()
代码都在data1()
output$plot1 <- renderPlot({data1()})
答案 0 :(得分:0)
而不是
plotOutput() and renderPlot()
使用:
ggiraphOutput() and renderggiraph()