[问题] 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