I have a checkboxGroupInput ui element as a Male and Female filter in shinydashboard which by default are both selected. I wish that
uiOutput("genderGroup") be hidden from the dashboard but make the values in output$genderGroup available as arguments in functions.
The reason for this is the dashboard is a template for multiple projects. Some projects will require filtering by gender others won't though the gender field is still included in the data. As a number of functions will be the same across projects, rather than having to rewrite them on a project by project basis I wonder if I could just hide the ui element and pass the defaults to the functions when hidden. On other projects requiring the filter, I can unhide them and let the user select.
I've tried wrapping
uiOutput("genderGroup") in hidden() but it also hides the values and the dashboard hangs when required by a function.