Control Flow with Shiny I am trying to make a shiny that pivots the type of graph depending on the input. If the input  equals a motorcycle, I want to display a table. Otherwise, I want to display a graph. What's the best way to do this? 

    server&lt;- function (input, output){

    myTransportation&lt;- reactive({
        switch(input$transportationSelection,
               "cars" = carDF,
              "trucks" = truckDF,
              "motorcycle" = motorcycleDF
    })
    if (myTransportation != motorcycleDF){
        #here is my working renderTable
    }
}