Below is an example and but in present situation i have lot of condition to be passed and i dont want to use the if statement. Is there any other way without using if i can get the work done.

Code 

```

library(shiny)

ui = fluidPage(
  selectInput('p_id','ID:', c(111,222,333)),
  uiOutput('uiID')
)

server = function(input, output, session) {

  maxdays <- reactive({
    if(input$p_id %in% c(111)){
      x = 1
    }else{
      if(input$p_id %in% c(222)){
        x = 2
      }else
        x = 3 
    }
    return(x)
  })

  output$uiID <- renderUI({
    selectInput('days','Days:', choices=seq(1,maxdays()))
  })

}

runApp(shinyApp(ui = ui, server = server))

```