问题
I'm working on a Shiny app that enables folk to browse some time series data. I have a number of widgets that enable people to select variables and type of analysis. In between, I have a modest radioButton
mechanism that allows users to select time series for some variables:
radioButtons("radio_year_select","Year", c("1999" = "1999", "2001" = "2001"))),
The code generates a simple widget:
In the context of this particular application, I would like to have the options presented in a horizontal order, like that:
Year: [X]1999 [ ]2001
Is there a simple way to achieve that?
回答1:
Add inline=TRUE
radioButtons("radio_year_select","Year", c("1999" = "1999", "2001" = "2001"), inline=T)
来源:https://stackoverflow.com/questions/31974588/displaying-radio-button-in-elements-in-shiny-in-a-horizontal-order-instead-of-de