我有一台Ubuntu14.04笔记本电脑, 当我使用RStudio Viewer在下面运行时,它会罚款。
> library(dygraphs)
> dygraph(ldeaths, main = "All", group = "lung-deaths")
在我将以下选项设置为在外部浏览器中运行后,
options("viewer"=NULL)
dygraph(ldeaths, main = "All", group = "lung-deaths")
浏览器将打开以下网址但未显示的文件: http://localhost:18186/session/viewhtmla4c45554fcb/index.html
如果我在R控制台中做同样的事情
library(dygraphs)
dygraph(ldeaths, main = "All", group = "lung-deaths")
它工作正常,将使用file:///tmp/RtmpE7nROm/viewhtmlf371b65fc2c/index.html
问题1:为什么Rstudio会打开" http://localhost:18186 ..."而不是" file://....."?
问题2:Rstudio中的哪些命令可以再次显示Viewer中的显示?目前我必须退出Rstudio并重新启动才能再次在Viewer中显示。
PS:我在其他Linux Labtops中没有看到这个问题,不确定会导致这个问题的配置,希望有人可以帮忙回答!以下是在httptudio中显示的sessionInfo()
sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=zh_TW.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=zh_TW.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=zh_TW.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=zh_TW.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dygraphs_0.4.6
loaded via a namespace (and not attached):
[1] htmlwidgets_0.5 zoo_1.7-12 magrittr_1.5 htmltools_0.2.6 tools_3.2.2 xts_0.9-7
[7] rstudioapi_0.3.1 yaml_2.1.13 grid_3.2.2 jsonlite_0.9.16 digest_0.6.8 lattice_0.20-33