I have a number of flags in the sidebar, which are defined as follows inside the sidebarPanel :
sliderInput("days", "Days to monitor:", min = 1, max = 50, value = 5), checkboxInput("display_CMC", "Carolinas Medical Center", TRUE), checkboxInput("display_MariaParham", "Maria Parham", TRUE), checkboxInput("display_WakeMed", "Wake Med", TRUE)
I would like to convert these results to a character vector programmatically (for example, if I had a checkboxInput named " display_ , I want it to automatically analyze the results). For this, I tried:
displayIdx <- grep( "display_", names(input) ) facilityCode_keep <- names(input)[ displayIdx ][ input[ displayIdx ] ]
Unfortunately, this leads to:
Error: Single-bracket indexing of reactivevalues object is not allowed.
Two questions:
- How to convert
checkboxInput series to character vector? - What happens when single parenthesis indexing is disabled. I could understand if I was trying to assign
input , but I don't know.
source share