R-with-Conda/README.md
2025-03-24 20:47:58 +08:00

52 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Conda中的R语言环境
## 安装准备
- VSCode 代码编辑器
VSCode中插件扩展安装
- R
- R Debugger
- Miniconda/Anaconda 虚拟环境管理
> [!NOTE]
> 自行检查conda的镜像源配置以加速库的下载安装。
- Git 代码同步工具
## 操作步骤
> [!NOTE]
> 此`conda-base`分支为调用conda的base环境作为R安装配置环境请留意终端Shell是否处于base环境中
0. 克隆本项目到指定的位置
`git clone https://git.unvec.site/stevenhobs/R-with-Conda <项目路径>`
1. 初始化conda虚拟环境
`conda create -c conda-forge r-base r-languageserver r-devtools r-httpgd radian`
2. 初始化R Debugger
VSCode命令面板搜索执行 `R Debugger: Update or install the required R Package`进行安装R的VSC调试库
或者在R的控制台中执行指令
`devtools::install_github("ManuelHentschel/vscDebugger")`
> [!NOTE]
> 此操作需要访问Github平台以获取源码编译安装请确保 github.com 可正常访问
3. 库的安装
在当前的conda环境下
使用`conda search -c conda-forge r-包名` 搜索对应的包
使用`conda install -c conda-forge r-包名` 安装对应的包
或者采用R通用的安装CRAN