相关疑难解决方法(0)

使用闪亮动态地将图表添加到网页

我想创建一个使用闪亮的应用程序,动态地将图表添加到页面.它可能是10个地块,它可能只有一个.我在闪亮的主页中使用本教程来获取动态UI.

这是一个简化的例子.该函数showme正在绘制图形

server.r

shinyServer(function(input, output) {
  # Create an environment for storing data
  symbol_env <- new.env()
  # Make a chart for a symbol, with the settings from the inputs
  make_chart <- function(symbol) {
    showme(symbol)
  }

  display <- c("1083484" , "1101732")

  output$MyList <- renderUi({ 
    for (i in i:nrow(display))
       renderPlot({make_chart(display[i])})
    })
})
Run Code Online (Sandbox Code Playgroud)

ui.r

shinyUI(pageWithSidebar(
  headerPanel("My Plots !"),
  sidebarPanel(
    wellPanel(
      p(strong("Scan1"))))
 ,mainPanel(
      uiOutput("MyList")
)))
Run Code Online (Sandbox Code Playgroud)

我收到以下错误

Listening on port 8100
Error in .subset2(x, "impl")$defineOutput(name, value, deparse(substitute(value))) : 
  Unexpected character output …
Run Code Online (Sandbox Code Playgroud)

r rstudio shiny

28
推荐指数
2
解决办法
1万
查看次数

标签 统计

r ×1

rstudio ×1

shiny ×1