以水平顺序而不是默认的垂直视图在 Shiny 中的元素中显示单选按钮
我正在开发一个 Shiny 应用,让人们可以浏览一些时间序列数据.我有许多小部件可以让人们选择变量和分析类型.在两者之间,我有一个适度的 radioButton
机制,允许用户为某些变量选择时间序列:
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:
年份: [X]1999 ; [ ]2001
Year: [X]1999 [ ]2001
有没有一种简单的方法可以实现这一目标?
Is there a simple way to achieve that?
添加 inline=TRUE
radioButtons("radio_year_select","Year", c("1999" = "1999", "2001" = "2001"), inline=T)