我想創建一個應用程序使用閃亮動態添加圖塊到頁面。它可能是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