在jupyter中使用R

如果想在Jupyter Notebook中使用R语言,以下几个步骤操作可行:

1、启动Anaconda Prompt

2、进入R的安装位置,切换到R的安装位置:D:\Program Files\R\R-3.4.3\bin,启动R,具体代码操作步骤如下,在Anaconda Prompt中逐行输入:

复制代码
C:\Users\think>d:
D:\>cd D:\Program Files\R\R-3.4.3\bin
D:\Program Files\R\R-3.4.3\bin>r

3、运行代码

复制代码
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec()

如果提示:

复制代码
Error in loadNamespace(x) : there is no package called 'devtools'

则先需要在R中安装好包:'devtools',再执行上面的代码就ok了。

4、退出R

复制代码
quit()

5、启动jupyter notebook

R已经被添加进去,可以愉快玩耍了。

参考文章:https://zhuanlan.zhihu.com/p/112388690

相关推荐
Tian_Hang1 天前
Eclipse Ditto 的权限策略
java·服务器·前端·网络·ide·ubuntu·eclipse
yang_coder1 天前
juypter notebook启动ssl报错的处理记录
python·jupyter
Tian_Hang1 天前
Eclipse Mosquitto 安装及介绍
java·运维·服务器·ide·sql·mysql·eclipse
星云_byto1 天前
五分钟从零配置好VSCode + Claude Code + DeepSeek V4 Pro
ide·vscode·编辑器·cursor·codex·claude code·deepseekv4
诚信定制8392 天前
Typora插件开发指南:打造专属IDE式写作环境
ide
Tian_Hang2 天前
Eclipse Ditto 物模型相关代码
java·运维·服务器·ide·eureka·eclipse
Tian_Hang2 天前
Eclipse Ditto 节流机制
java·ide·eclipse
DogDaoDao2 天前
AI 编程 IDE 全景解析 2026:Agent 全面接管开发链路
ide·人工智能·程序员·ai编程·claude·cursor·ai agent
林熙蕾LXL2 天前
VSCode调试
ide·vscode·编辑器
测试工程师成长之路2 天前
Typora插件开发指南:打造专属IDE式写作环境
ide