将VScdoe的R终端替换为radian
Miniconda介绍
Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others.
radian介绍
radian is an alternative console for the R program with multiline editing and rich syntax highlight. One would consider radian as a ipython clone for R, though its design is more aligned to julia.
以下操作均是在Windows 10 LTSC 2019环境
安装radian
- 安装Minicoda 3(python 3.8支持tensorflow)。
- 根据清华镜像(https://mirror.tuna.tsinghua.edu.cn/help/anaconda/)提示操作。
- 运行 conda powershell propmt(以下均在此环境)
- 用coda命令管理库
- 查看已经安装的库:coda list
- 安装库:coda install 库名
- 安装常用的库
- scipy
conda install scipy
- scipy
- 安装radian
pip install -U radian
或安装开发版
pip install -U git+https://github.com/randy3k/radian
运行radianradian
在VScode中用radian替换rterm
ctrl+,
打开设置,左侧“扩展->R”然后设置如下:(R安装在D:\ProgramFiles\ACsoft\R
)
- "Rpath: Windows"设为
D:\ProgramFiles\ACsoft\R\bin\x64\R.exe
- "Rterm: Windows"中将默认的rterm(
D:\ProgramFiles\ACsoft\R\bin\x64\R.exe
)替换为radian.exe的路径D:\ProgramFiles\Coding\Miniconda3\Scripts\radian.exe
。(Minicoda安装在D:\ProgramFiles\Coding\Miniconda3
) - "Rterm: Option"去掉
--no-save
和--no-store
- 重新启动VScode
- 发送R代码到控制台,Radian出现。
- 第一次发送调用R终端,第2次才会将代码发送到终端。
- 发送快捷键
ctrl+enter
- 右侧的窗口显示作图、帮助等信息(类似Rstudio的界面)
上面设置在setting.json中如下:
"r.rterm.windows": "D:\\ProgramFiles\\Coding\\Miniconda3\\Scripts\\radian.exe",
"r.rpath.windows": "D:\\ProgramFiles\\ACsoft\\R\\bin\\x64\\R.exe",
"r.lsp.debug": true,
"r.bracketedPaste": true, //使用radian设置
"r.sessionWatcher": true, //使用radian设置
"r.rterm.option": [], //使用radian设置
本文来自博客园,作者:hzworld,转载请注明原文链接:https://www.cnblogs.com/ourweiguan/p/14650353.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
· 零经验选手,Compose 一天开发一款小游戏!