Compare commits

...

3 Commits

Author SHA1 Message Date
Steven Hobs
6ed7da5c4c 增加两个基础r包 2025-03-24 20:56:23 +08:00
Steven Hobs
688aa1c7fa fix R path 2025-03-24 20:53:21 +08:00
Steven Hobs
d62bb39ecb conda base 环境支持 2025-03-24 20:47:58 +08:00
2 changed files with 11 additions and 10 deletions

12
.vscode/settings.json vendored
View File

@ -1,13 +1,11 @@
/* VSCode */ /* VSCode */
{ {
"r.rpath.linux": ".conda/bin/R", "r.rpath.linux": "${env:HOME}/miniconda3/bin/R",
"r.libPaths": [ "r.rterm.linux": "radian",
".conda/bin/R/library"
],
"r.rterm.linux": "${workspaceFolder}/.conda/bin/radian",
"r.rterm.option": [ "r.rterm.option": [
"--no-save", "--no-save",
"--no-restore" "--no-restore",
"--r-binary=${env:HOME}/miniconda3/bin/R"
], ],
"r.plot.useHttpgd": true, "r.plot.useHttpgd": true,
"r.lsp.diagnostics": true, "r.lsp.diagnostics": true,
@ -22,7 +20,7 @@
"editor.defaultFormatter": "REditorSupport.r", "editor.defaultFormatter": "REditorSupport.r",
"editor.formatOnSave": true "editor.formatOnSave": true
}, },
"terminal.integrated.defaultProfile.linux": "R Terminal", // "terminal.integrated.defaultProfile.linux": "R Terminal", // R
"files.eol": "\n", "files.eol": "\n",
"editor.tabSize": 2, "editor.tabSize": 2,
"editor.detectIndentation": false "editor.detectIndentation": false

View File

@ -18,13 +18,16 @@
## 操作步骤 ## 操作步骤
> [!NOTE]
> 此`conda-base`分支为调用conda的base环境作为R安装配置环境请留意终端Shell是否处于base环境中
0. 克隆本项目到指定的位置 0. 克隆本项目到指定的位置
`git clone https://git.unvec.site/stevenhobs/R-with-Conda <项目路径>` `git clone https://git.unvec.site/stevenhobs/R-with-Conda <项目路径>`
1. 初始化conda虚拟环境 1. 初始化conda虚拟环境
`conda create -p .conda -c conda-forge r-base r-languageserver r-devtools r-httpgd radian` `conda create -c conda-forge r-base r-languageserver r-devtools r-httpgd r-rlang r-jsonlite radian`
2. 初始化R Debugger 2. 初始化R Debugger
@ -41,8 +44,8 @@
在当前的conda环境下 在当前的conda环境下
使用`conda search -p .conda -c conda-forge r-包名` 搜索对应的包 使用`conda search -c conda-forge r-包名` 搜索对应的包
使用`conda install -p .conda -c conda-forge r-包名` 安装对应的包 使用`conda install -c conda-forge r-包名` 安装对应的包
或者采用R通用的安装CRAN 或者采用R通用的安装CRAN