[問題] Shiny中plot位置的問題

作者: MonsterBorn (潘蹦!!)   2017-09-06 15:02:56
[問題類型]:
程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
[軟體熟悉度]:
入門(寫過其他程式,只是對語法不熟悉)
[問題敘述]:
在建立類神經網路時,使用Shiny介面想Plot出最後的類神經網路結構圖
但Plot出來的圖總是會出現在R內,而不是在Shiny介面上
如下圖,謝謝大家。
[程式範例]:
原諒我僅列出部分程式碼
ui部分
mainPanel({
tabsetPanel(
tabPanel("結構圖", plotOutput("data2Plot")),
tabPanel("Summary", verbatimTextOutput("summary")),
tabPanel("表格", tableOutput("table2"))
)
}
server部分
output$data2Plot<-renderPlot({
plot(datafile2())
})
截圖:https://imgur.com/a/3sblH
[環境敘述]:
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese
(Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] neuralnet_1.33 shiny_1.0.3
loaded via a namespace (and not attached):
[1] R6_2.2.2 htmltools_0.3.6 tools_3.3.3 Rcpp_0.12.10
grid_3.3.3 jsonlite_1.5 digest_0.6.12
[8] xtable_1.8-2 httpuv_1.3.5 mime_0.5
[關鍵字]:
Shiny neuralnet
作者: clansoda (小笨)   2017-09-06 16:30:00
是不是應該先plot完存成reactive value然後直接call出來你是在reactive裡面plot

Links booklink

Contact Us: admin [ a t ] ucptt.com