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

1

17

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:

widget - years

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?

Munguia answered 12/8, 2015 at 20:17 Comment(0)
C
37

Add inline=TRUE

radioButtons("radio_year_select","Year", c("1999" = "1999", "2001" = "2001"), inline=T)
Carolus answered 12/8, 2015 at 20:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.