この質問の指示に従って、Shiny の renerUI を使用してオンザフライで UI オブジェクトを作成しています。
次のエラーが表示されます
Error in if (!grepl(pattern, text)) return(text) : 
  argument is of length zero
これを読んだ後、私は問題がこの行であることを知っています
# Convert the list to a tagList
do.call(tagList, plot_output_list)
しかし、私は解決策が示唆したことを正確に行っています。どんな助けにも感謝します。
コード
サーバー.r
shinyServer(function(input, output) {
    # Create an environment for storing data
    symbol_env <- new.env()
    output$plots <- renderUI({
        if (input$goButton == 0) 
            return()
        if (loaded_index != input$chosen_index) {
            # ... alot of code to generate data.frames and plots 
            output[["summary"]] <- renderPlot(grid.arrange(g1,g2,g3,g4,g5,nrow=1))
            for (i in 1:length(results)) {
                # Need local so that each item gets its own number. Without it, the value
                # of i in the renderPlot() will be the same across all instances, because
                # of when the expression is evaluated.
                local({
                    my_i <- i
                    plotname <- object_name("plot", names(results[my_i]))
                        output[[plotname]] <- renderPlot({
                            showme_plot(results[[names(results[my_i])]]$data , period = DEFAULT_TIME_PERIOD)})
                    tablename <- object_name("table", names(results[my_i]))
                        output[[tablename]] <- renderTable({
                            make_summary(names(results[my_i]))})
                    })
            }
        }
        plot_output_list <- list()
        # Graphical Summary     
        plot_output_list[["summary"]] <- tags$div(class="summary" , plotOutput("summary")) 
        # The List
        for (symbol in names(results))
            plot_output_list[[symbol]] <- 
                tags$div(class = "container" ,
                    tags$div(class = "name"  , name(symbol)),
                    tags$div(class = "stats" , tableOutput(object_name("table", symbol))) , 
                    tags$div(class = "plot"  , plotOutput(object_name("plot", symbol), height = 530)))
        print("Plot structure defined")
        # Convert the list to a tagList
        do.call(tagList, plot_output_list)
    })
})
ui.r
require(shinyIncubator) 
shinyUI(
    bootstrapPage(
        tags$script(src = "keyboard_scroller.js") , 
        tags$link(rel="stylesheet" , type="text/css" , href="custom.css") ,
        actionButton("goButton", "Go!") , 
        selectInput("chosen_index" , "INDEX: " , list("A" = '1' , "B" = '2')) ,
        # This is the dynamic UI for the plots
        uiOutput("plots")
))