当前位置: 代码迷 >> 综合 >> ubuntu15.04上jupyter notebook嵌入R语言
  详细解决方案

ubuntu15.04上jupyter notebook嵌入R语言

热度:10   发布时间:2023-12-12 01:20:58.0

Reflink:http://irkernel.github.io/

  1. ctrl+shift+T调出Terminal
    输入:sudo apt-get install libzmq3-dev

  2. 在terminal中输入sudo R,调用R语言;

输入

install.packages(c('rzmq','repr','IRkernel','IRdisplay'),repos = c('http://irkernel.github.io/', getOption('repos')),type = 'source')
  1. 使得R核心可以被Jupyter使用:
还是在R环境里:
The kernel spec can be installed for the current user with the following line from R:
> IRkernel::installspec()
To install system-wide, set user to False in the installspec command:>IRkernel::installspec(user = FALSE)
src="http://nbviewer.jupyter.org/github/LiaoPan/MyCodeSpace/blob/master/EnhancePython/demo_R.ipynb" width="850" height="500">

之后,当然就可以用了~

分享下一些R语言经典的资料:
https://pan.baidu.com/s/1i5povel R语言的编程艺术+数据挖掘和R语言
https://pan.baidu.com/s/1o7NZNGQl R语言实战

  相关解决方案