Jupyter中的R内联图

编程入门 行业动态 更新时间:2024-10-09 19:20:51
本文介绍了Jupyter中的R内联图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图通过 Binder 项目界面在Jupyter中运行R,尽管问题可能更笼统.例如,该问题可能与长期休眠的问题 a>关于Mac OS上的Jupyter.我通过 conda 添加了r-essentials,r-rzmq和r-repr. IRKernel和IRDisplay是r-essentials的一部分.但是,当我尝试绘制任何东西时,没有输出.确实,似乎没有图形输出选项.我在这里想念什么?在python笔记本中没有问题,但是R没有运气.

I am trying to run R in Jupyter through the Binder project interface, though the question may be more general. For instance it question may be related the long-dormant one about Jupyter on Mac OS. I have the r-essentials, r-rzmq and r-repr added through conda. IRKernel and IRDisplay are part of r-essentials. However, when I try to plot anything, there is no output. Indeed, it looks like there are no graphics output options. What am I missing here? There is no problem in python notebooks, but no luck with R.

capabilities() jpeg FALSE png FALSE tiff FALSE tcltk TRUE X11 FALSE aqua FALSE http/ftp TRUE sockets TRUE libxml TRUE fifo TRUE cledit FALSE iconv TRUE NLS TRUE profmem TRUE cairo FALSE ICU TRUE long.double TRUE libcurl TRUE

推荐答案

好,所以@hrbrmstr指出U. Anaconda'.我可以内联绘图通过使用Dockerfile来工作,并使用apt-get IRKernel安装R根据官方指示通过CRAN:

OK, so as @hrbrmstr points out 'Ugh. Anaconda'. I could get inline plotting to work by using a Dockerfile, and installing R using apt-get IRKernel via CRAN, as per official instructions:

# Set default CRAN repo RUN echo 'options("repos"="cran.rstudio")' > .Rprofile # Install IRkernel RUN Rscript -e "install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))" -e "devtools::install_github('IRkernel/IRkernel')" -e "IRkernel::installspec(user = FALSE)"

更多推荐

Jupyter中的R内联图

本文发布于:2023-07-18 14:21:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1145663.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内联   Jupyter

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!