Shiny 绘图不';使用ggvis时不显示

Shiny 绘图不';使用ggvis时不显示,shiny,Shiny,在我闪亮的应用程序中使用ggvis渲染绘图时遇到问题 在ui.R中: mainPanel( tabsetPanel( tabPanel("Plot", plotOutput("coolplot"))) output$coolplot <- renderPlot({ if (is.null(filtered())) { return() } filtered() %>% ggvis(~Alcohol_Content, fill := "#fff8dc") %&g

在我闪亮的应用程序中使用ggvis渲染绘图时遇到问题

ui.R
中:

 mainPanel(
  tabsetPanel(
    tabPanel("Plot", plotOutput("coolplot")))
  output$coolplot <- renderPlot({
if (is.null(filtered())) {
  return()
}
filtered() %>% ggvis(~Alcohol_Content, fill := "#fff8dc") %>% 
  layer_histograms(width = 1, center = 0)
})
server.R
中:

 mainPanel(
  tabsetPanel(
    tabPanel("Plot", plotOutput("coolplot")))
  output$coolplot <- renderPlot({
if (is.null(filtered())) {
  return()
}
filtered() %>% ggvis(~Alcohol_Content, fill := "#fff8dc") %>% 
  layer_histograms(width = 1, center = 0)
})
output$coolplot%ggvis(~酒精含量,填充:=“#fff8dc”)%>%
图层直方图(宽度=1,中心=0)
})
当我使用ggvis时,绘图会显示在我的RStudio查看器窗格中,但不会显示在窗口中(当我将绘图推到
shinyapps.io
)如果我使用ggplot2而不是ggvis,它会正常工作

在ui.R中你需要ggvisOutput()在ui.R中你需要ggvisOutput()在