I am building a widget on Shiny, and I would like to have the option \"all\" to select all of the data available, and don\'t perform a filtering.
Basically, I would
Something like this should work (with proper modifications to use the input value in this reactive for the filt variable):
filt
reactiveObject <- reactive({ filt <- sample(c("All", unique(mtcars$carb)),1) if (filt == 'All') { data1 <- mtcars } else { data1 <- filter(mtcars, carb == filt) } data1 })