在闪亮的动态框成功后:R/Shiny:框的颜色取决于选择我需要您在循环中使用这些框。\n示例:\n我有一个输入文件,其中给出了以下内容:
\n\n我希望在 renderUI 循环中将这些值作为变量来动态生成框 A、B 和 C。(如果我有 4 个值,我将有 4 个框等。)
\n\n这是我的实际代码:
\n\nfor (i in 1:nrow(QRSList))\nRun Code Online (Sandbox Code Playgroud)\n\n{\n get(QRSOutputS[i]) <- renderUI({\n column(4,\n box(title = h3(QRSList[1], style = "display:inline; font-weight:bold"),
\n\n selectInput("s010102i", label = NULL,\n choices = list("Non commenc\xc3\xa9" = "danger", "En cours" = "warning", "Termin\xc3\xa9" = "success"),\n selected = 1) ,width = 12, background = "blue", status = get(QRSIntputS[i])))\n })\n column(4,\nobserveEvent(input$s010102i,{\n get(QRSOutputS[i]) <- renderUI({\n box(title = h3(QRSList[1], …Run Code Online (Sandbox Code Playgroud)