Displaying radio button in elements in Shiny in a horizontal order instead of default vertical view

情到浓时终转凉″ 提交于 2019-12-30 08:15:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!