作者MonsterBorn (潘蹦!!)
看板R_Language
标题[问题] Shiny中plot位置的问题
时间Wed Sep 6 15:02:56 2017
[问题类型]:
程式谘询(我想用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
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.117.58.169
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/R_Language/M.1504681380.A.D29.html
1F:→ clansoda: 是不是应该先plot完存成reactive value然後直接call出来 09/06 16:30
2F:→ clansoda: 你是在reactive里面plot 09/06 16:30
好的我再试试看!!
※ 编辑: MonsterBorn (140.117.58.169), 09/07/2017 13:59:40