【问题标题】:Rstudio crushing when calling rgl and knitr in ioslides presentation在 ioslides 演示文稿中调用 rgl 和 knitr 时 Rstudio 崩溃
【发布时间】:2015-09-03 11:18:33
【问题描述】:

尝试在 ioslides html 演示文稿中使用 knitr 绘制 rgl 3d 绘图时,我的 RStudio 会话崩溃了。有什么办法可以预防吗?

我的块:

```{r setup, results='asis'}
library(knitr)
library(rgl)
knit_hooks$set(webgl = hook_webgl)
```

```{R, testgl, webgl=TRUE, cache=FALSE}
x <- sort(rnorm(1000))
y <- rnorm(1000)
z <- rnorm(1000) + atan2(x,y)
plot3d(x, y, z, col=rainbow(1000))
```

编辑

此错误发生在:

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] rsconnect_0.4.1.4 htmltools_0.2.6   tools_3.2.1       yaml_2.1.13       rmarkdown_0.7     digest_0.6.8     
> 

演示的源代码可以在这里找到:

https://github.com/TARF/SMM/tree/master/Presentation

请注意,为了运行代码,需要使用自己的凭据通过 Demography 包连接到 Human Mortality Database。

【问题讨论】:

    标签: r rstudio knitr rgl


    【解决方案1】:

    您可能需要更新 RStudio。我让它崩溃了一段时间,我想是因为他们的 WebGL 实现不起作用;现在它运行良好(虽然它不显示 WebGL,但我必须在浏览器中查看输出)。

    几年后编辑:我已经很长时间没有看到崩溃了,rgl(通过调用 rglwidget() 显示)现在在 RStudio 中显示正常。

    【讨论】:

    • 我认为您需要提供足够的详细信息,以便有人重现崩溃。发布完整的 .Rmd 文档,并列出 R 中的 sessionInfo 以及 RStudio 版本号。
    猜你喜欢
    • 1970-01-01
    • 2017-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-24
    • 2017-05-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多