【发布时间】:2013-03-30 08:08:36
【问题描述】:
我想创建一个使用闪亮的应用程序,该应用程序可以动态地将绘图添加到页面。可能是 10 个地块,也可能只有一个地块。我在闪亮的主页中使用this tutorial 来获取动态用户界面。
这是一个简化的例子。
函数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])})
})
})
ui.r
shinyUI(pageWithSidebar(
headerPanel("My Plots !"),
sidebarPanel(
wellPanel(
p(strong("Scan1"))))
,mainPanel(
uiOutput("MyList")
)))
我收到以下错误
Listening on port 8100
Error in .subset2(x, "impl")$defineOutput(name, value, deparse(substitute(value))) :
Unexpected character output for display
如果不是这样 - 我将不胜感激任何指导。 谢谢。
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: i386-w64-mingw32/i386 (32-bit)
【问题讨论】: