Using variable number of input fields in shiny page

后端 未结 1 969
盖世英雄少女心
盖世英雄少女心 2021-01-06 21:14

My problem is as follows:

I have a shiny application that displays a variable number of output elements based on user input (as, for example, is detailed in: dynamic

相关标签:
1条回答
  • 2021-01-06 21:38

    While I don't find it to be an ideal solution, assigning:

    output[[modifier]] <- renderUI({selectInput(
                                          inputId = modifier,
                                          label="select how to display",
                                          choices = c("plot","table"),
                                          selected = input[[modifier]])})
    

    solves the problem, though I'd be happy to get a better solution (specifically one that avoids the construction of the input object every time anew).

    0 讨论(0)
提交回复
热议问题