我试图通过 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内联图
发布评论