Adding more than one chart to mainPanel in Shiny (R)

I am trying to have several html files in my brilliant application, but it seems that it can only show one at a time.

My user interface:

# ui.R 

shinyUI(
mainPanel(

tableOutput("view"),
plotOutput("view2")

))

And my server:

# server.R
library(googleVis)
library(RMySQL)

shinyServer(function(input, output) {



datasetInput <- reactive({

    "try2" = subset(try1, idCampaign == input$inputId)

})



output$view <- renderGvis({

gvisTable(datasetInput(),options=list(width=1000, height=270, col='blue'))

})

output$view2 <- renderGvis({

gvisScatterChart(datasetInput2())


})

})
0
source share
2 answers

in the output on view2 you use datasetInput2(), it should be datasetInput(). This datasetInput()is a dynamic version of the data frame, you can use as many functions as possible, so there is no need to index it.

0
source

, , tabsetPanel, tabPanel.

0

All Articles