teelou teelou - 3 years ago 55
R Question

Shiny - How not to select any option in radioButtons?

How can I not to select any option in radioButtons?

From this doc:


selected The initially selected value (if not specified then defaults
to the first value)


But I don't want to select anything when the page is loaded. Is it possible?

Answer Source

From the Documentation:

If you need to represent a "None selected" state, it's possible to default the radio buttons to have no options selected by using selected = character(0). However, this is not recommended, as it gives the user no way to return to that state once they've made a selection. Instead, consider having the first of your choices be c("None selected" = "").

Hope this helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download