Jupyter安装r内核
来源:互联网 发布:淘宝运营工资高吗 编辑:程序博客网 时间:2024/06/05 02:32
19、给Jupyter安装其他的内核
Jupyter的优良性能之一是可以运行不同语言的内核。下面以运行R内核为例说明:
简单的方法:通过Anaconda安装R内核
conda install -c r r-essentials
稍微麻烦的方法:手动安装R内核
如果你不是用Anaconda,过程会有点复杂,首先,你需要从CRAN安装R。
之后,启动R控制台,运行下面的语句:
install.packages(c('repr', 'IRdisplay', 'crayon', 'pbdZMQ', 'devtools'))devtools::install_github('IRkernel/IRkernel')IRkernel::installspec() # to register the kernel in the current R installation
20、在同一个notebook里运行R和Python
要这么做,最好的方法事安装rpy2(需要一个可以工作的R),用pip操作很简单:
pip install rpy2
然后,就可以同时使用两种语言了,甚至变量也可以在二者之间公用:
In [1]: %load_ext rpy2.ipythonIn [2]: %R require(ggplot2)Out[2]: array([1], dtype=int32)In [3]: import pandas as pd df = pd.DataFrame({ 'Letter': ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'], 'X': [4, 3, 5, 2, 1, 7, 7, 5, 9], 'Y': [0, 4, 3, 6, 7, 10, 11, 9, 13], 'Z': [1, 2, 3, 1, 2, 3, 1, 2, 3] })In [4]: %%R -i df ggplot(data = df) + geom_point(aes(x = X, y= Y, color = Letter, size = Z))
阅读全文
0 0
- Jupyter安装r内核
- 安装jupyter 添加新内核
- 如何在jupyter中安装R
- jupyter (ptyhon|R)
- jupyter安装
- jupyter安装及配置scala、spark、pyspark内核
- R与Jupyter(windows)
- 安装jupyter notebook
- 安装anaconda和jupyter
- Python安装jupyter (linux)
- 安装jupyter notebook方法
- jupyter notebook安装
- jupyter安装与卸载
- jupyter安装与卸载
- anaconda安装jupyter notebook
- linux安装jupyter
- 快速安装Jupyter Notebook
- pip安装jupyter
- POJ 2594 Treasure Exploration(最小路径覆盖+Floyd求传递闭包)
- meavn建立
- Linux截图、查看图片
- 南阳理工ACM 题目21 三个水杯 java代码 广度优先
- 图文详解java内存回收机制
- Jupyter安装r内核
- android与h5之间的互调
- Makefile学习笔记3
- JSON
- STL源码学习----lower_bound和upper_bound算法
- unordered_multimap的insert问题
- UVa 11401 数三角形(组合数学)
- 循环的代价
- 常用Linux 服务器命令