Re: [問題] 在shiny上以rCharts畫scatter plot

作者: celestialgod (天)   2015-07-26 15:13:08
7/26 16:23更新:
後來測試成功,重點在於設定dom的名稱
code: http://pastebin.com/6c0gdc1Y
nPlot成功案例:http://tinyurl.com/ovuxmpt
7/26 15:10寫的:
我跑是沒出現任何警告跟錯誤,我的環境列於下方:
而且有正常呈現,不過你的scatter_plot那個tab沒有圖就是
> sessionInfo()
R version 3.2.0 (2015-04-16)
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
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] 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] shiny_0.11.1 rCharts_0.4.5
loaded via a namespace (and not attached):
[1] R6_2.0.1 plyr_1.8.2 htmltools_0.2.6 tools_3.2.0
[5] whisker_0.3-2 yaml_2.1.13 Rcpp_0.11.5 RJSONIO_1.3-0
[9] grid_3.2.0 digest_0.6.8 xtable_1.7-4 httpuv_1.3.2
[13] mime_0.3 lattice_0.20-31
測試code: http://pastebin.com/qxpRSm0y
(我只是把ui.R跟server.R合併到function而已)
※ 引述《ardodo (米蟲)》之銘言:
: [問題類型]:
:
: 程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
:
: [軟體熟悉度]:
: 請把以下不需要的部份刪除
: 入門(寫過其他程式,只是對語法不熟悉)
:
: [問題敘述]:
: 版友好,我試著以rCharts在shiny上繪製iris的散布圖,但是畫不出來,不知道為什麼
: code在此 http://pastebin.com/EkS2YxcC
: 執行shiny後,會跳出以下的訊息:
: Note: the specification for S3 class “AsIs” in package ‘jsonlite’ seems
: equivalent to one from package ‘RJSONIO’: not turning on duplicate class
: definitions for this class.
: 懇請解答,感謝
: 附上我的sessionInfo
: other attached packages:
: [1] rCharts_0.4.5 shiny_0.12.1
: loaded via a namespace (and not attached):
: [1] Rcpp_0.11.6 lattice_0.20-31 digest_0.6.8 mime_0.3
: grid_3.2.1
: [6] R6_2.1.0 plyr_1.8.3 xtable_1.7-4 jsonlite_0.9.16
: rstudioapi_0.3.1
: [11] whisker_0.3-2 RJSONIO_1.3-0 tools_3.2.1 httpuv_1.3.2
: yaml_2.1.13
: [16] rsconnect_0.4.1.2 htmltools_0.2.6
作者: ardodo (米蟲)   2015-07-27 11:44:00
感謝版主的回文,看起來rCharts的不同套件功能如hPlot,rPlot, nPlot在設定上略有不同,而重點就是dom要指名不曉得哪裡有rCharts底下各種圖的用法說明文件?我找了好久只找到rCharts Documentation比較完整想知道如何設定圖形大小、margin等圖形參數原來如此,所以就是要查看看這些rCharts支援的js library是怎麼設定圖形的囉?感謝回答感謝版主熱心的分享,看來這需要學習js才能解決太感謝了!!!!

Links booklink

Contact Us: admin [ a t ] ucptt.com