I have a series of grouped checkboxes on a shinydashboard side panel that is used to subset data. All bar one group has a selected box checked. The final group has just one option and the default is unchecked. It points to a binary variable (0, 1) on the data set. If unchecked no filter should apply and if checked it subsets on the 1 value.
So far I have this in ui
label = h5("Filter by patient cohort"),
choices = c("Patient cohort" = 1),
selected = 0,
width = "100%")
subsetArg <- reactive(list(
ifelse(is.null(input$patFilt), c(0, 1), 1)
if(is.null(input$patFilt)) c(0,1) else 1
Don't know why ifelse() didn't work.