Thanks for awesome package. It appears that multiple_radio() returns NULL in case only one choice is defined as argument. See the example below. I would expect that multiple_radio() returns "A" in the following example:
# Checkbox
library(shiny)
library(shiny.semantic)
ui <- function() {
shinyUI(
semanticPage(
h1("Radioboxes"),
multiple_radio("radioboxes", "Select Letter", LETTERS[1], selected = "A"),
p("Selected letter:"),
textOutput("selected_letter")
)
)
}
server <- shinyServer(function(input, output) {
output$selected_letter <- renderText( input$radioboxes )
})
shinyApp(ui = ui(), server = server)
A possible work around is the following, however multiple_radio() returning "A" instead of NULL seems more obvious to me.
server <- shinyServer(function(input, output) {
output$selected_letter <- renderText( ifelse(is.null( input$radioboxes ),
"A", input$radioboxes))
})
Thanks for awesome package. It appears that
multiple_radio()returnsNULLin case only one choice is defined as argument. See the example below. I would expect thatmultiple_radio()returns"A"in the following example:A possible work around is the following, however
multiple_radio()returning"A"instead ofNULLseems more obvious to me.