Hi Andy !! Hope you doing well.
I have one more issue in making multiple "dataTables".
shinyUI(fluidPage(
theme = shinytheme("united"),
titlePanel("Title"),
sidebarPanel(
selectInput('level',"Select the data :",choices = c("Daily","Monthly"))
),
mainPanel(
tabsetPanel(
tabPanel('Data View',column(12,offset = 1,h2('Data Input'),tableOutput('table')))
))
))
Server.R
shinyServer(function(input, output) {
Daily <- read.csv("data/Daily.csv",header = TRUE, sep = ",", quote = "\"", dec = "." ,fill=TRUE)
Monthly <- read.csv("data/Monthly.csv",header = TRUE, sep = ",", quote = "\"", dec = "." ,fill=TRUE)
output$table <- renderTable({
if(input$level=='Monthly'){Monthly}
else{
Daily
}
})
})
Note : 1. Ideally I want to select data using dropdown(selectInput) & mainPanel should display either Daily or Monthly data reactively.
2. I tried the above method which is not working.