我有以下Shiny Application:
library(shiny)
library(shinyBS)
UI <- shinyUI(fluidPage(
fluidRow(
column(10,
plotOutput("line_graph")),
#Pop up windows, for three buttons on the left side
bsModal("modalExample1", "Your plot", "a_plot", size = "large",
plotOutput("plot1"), downloadButton('downloadPlot', 'Download')),
#bsModal("modalExample2", "Your plot", "b_plot", size = "large",
# plotOutput("plot2"), downloadButton('downloadPlot', 'Download')),
column(2,
actionButton("a_plot","Bubble chart"),
actionButton("b_plot","Graph view"))
)
))
Server <- function(input, output) {
output$line_graph <- renderPlot({hist(10)})
output$plot1 <- renderPlot({hist(20)})
output$plot2 <- renderPlot({hist(30)})
}
shinyApp(ui = UI, server = Server)
当我按下按钮&#34; a_plot&#34;你会得到一个带图表的弹出窗口。这有效。但是我还想要实现这一点,当我按下&#34; b_plot&#34;时,我会弹出另一个图表。
但是,当我取消注释此代码时:
它不起作用。关于我如何运作的任何反馈意见?
#bsModal("modalExample2", "Your plot", "b_plot", size = "large",
# plotOutput("plot2"), downloadButton('downloadPlot', 'Download')),
答案 0 :(得分:3)
您有2个元素与SELECT developer.developer_name, count(project.dev_id)
FROM project
JOIN developer ON developer.id = project.dev_id
GROUP BY developer.developer_name
= id
您不能拥有该元素,您需要始终具有唯一downloadPlot
id