if function for fileInput and disable/enable selectInput and fileInput upon the selection of Advanced checkboxInput

I have a Shiny code as like this

library(datasets)
ui <-fluidPage(    
titlePanel("Telephones by region"),
sidebarLayout(      
sidebarPanel(
  selectInput("region", "Region:", 
              choices=colnames(WorldPhones)), checkboxInput(inputId = "Adv",
                                                            label = strong("Advanced"),
                                                            value = FALSE),fileInput("file1", "Choose CSV File",
            multiple = FALSE,accept = c("text/csv", "text/comma-separated-values,text/plain", ".csv")),
  hr(),
  helpText("Data from AT&T (1961) The World's Telephones.")),
mainPanel(
  plotOutput("phonePlot")   )))

server <- function(input, output) {

output$phonePlot <- renderPlot({

barplot(WorldPhones[,input$region]*1000, 
        main=input$region,
        ylab="Number of Telephones",
        xlab="Year")})}
shinyApp(ui, server)

I need to implement following modifications

  1. How to use if function for fileInput from user input (Asia,Africa….ect one per line )
  2. How to disable/enable selectInput and fileInput upon the selection of Advanced checkboxInput. If user choose advanced, the selectInput must be disable (vice versa)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.