我想创建一个应用程序使用闪亮动态添加图块到页面。它可能是10个地块,它可能只有一个。我在动态用户界面的闪亮主页中使用this tutorial。使用闪亮动态地添加图表到网页使用闪亮
这是一个简化的例子。 功能showme
被ploting图
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)
感谢的人 - 这就是我一直在寻找。我设法得到绘制的动态列表,但是,我想打印出一个对象列表 - 每个对象都包含一个标题,一个图表和一个表格。你知道我该怎么做? – haki 2013-05-25 09:03:46
你的意思是:a)对于你想要绘制所有三件事物(标题,情节和表格)的每个选定对象,或者b)对于每个选定的对象,然后选择要绘制哪三个对象意味着别的东西)? – 2013-05-25 10:09:18
a - 对于每个对象我想要一个标题,一个绘图和一个汇总表。动态用户界面应该由某种容器而不只是一个情节。我已经尝试使用'renderTable'向标记列表和输出添加表格,但它只显示最后添加的一个表格 - 在我的情况下,表格。 – haki 2013-05-25 14:40:53