|||
本文转载自https://qiita.com/crowdy/items/3738ebe1edb95839753f
准备工作:
安装anaconda, 下载地址:https://www.anaconda.com/distribution/
安装完毕后,打开anaconda Prompt
输入:
conda install -c conda-forge r
开始安装
Proceed ([y]/n)? y
which r r
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest')) devtools::install_github('IRkernel/IRkernel')
install Rkernel on current environment
IRkernel::installspec()
exit RTerm with q()
coomand and run jupyter lab
again.
irkernel installation
https://irkernel.github.io/installation/
Producing Simple Graphs with R
https://www.harding.edu/fmccown/r/
以上安装过程,在不同系统中可能存在差异,请根据安装提示完成。
使用过程的补充提示:
(1)没有指定工作文件夹的情况下,jupyter lab默认是打开C盘,我们平时工作的代码文件通常是放在D盘或其他盘的文件夹中的,如何在Jupyter lab中打开到指定的工作文件夹:
可以在Anaconda Prompt 中改变工作路径,如,我们的工作文件夹是D:\T\R-Graph-gallery,可以输入图中的命令:
d: cd T\R-Graph-gallery jupyter lab |
即可打开jupyter lab
双夹打开我们已经建好的ipynb文件,这个文件可以执行R
(2)jupyter lab背景设置
长期用代码,可以把背景变成黑色,在Setting\Jupyterlab Theme中设置
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-19 23:09
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社