更新
This commit is contained in:
parent
4fba39cdee
commit
1cec12dbb9
2
.Rprofile
Normal file
2
.Rprofile
Normal file
@ -0,0 +1,2 @@
|
||||
# R 配置
|
||||
options("repos" = c(CRAN = "https://mirrors.cernet.edu.cn/CRAN/"))
|
5
.lintr
Normal file
5
.lintr
Normal file
@ -0,0 +1,5 @@
|
||||
linters: linters_with_defaults(
|
||||
line_length_linter(120),
|
||||
object_usage_linter = NULL,
|
||||
commented_code_linter = NULL
|
||||
)
|
21
.vscode/settings.json
vendored
21
.vscode/settings.json
vendored
@ -1,14 +1,27 @@
|
||||
/* VSCode 项目配置 */
|
||||
{
|
||||
"r.rpath.linux": ".conda/bin/R",
|
||||
"r.libPaths": [
|
||||
".conda/bin/R/library"
|
||||
],
|
||||
"r.rterm.linux": "${workspaceFolder}/.conda/bin/R",
|
||||
"r.rterm.option": [
|
||||
"--no-save",
|
||||
"--no-restore"
|
||||
],
|
||||
"r.plot.useHttpgd": true,
|
||||
"r.libPaths": [
|
||||
".conda/bin/R/library"
|
||||
],
|
||||
"files.eol": "\n"
|
||||
"r.lsp.diagnostics": true,
|
||||
"r.alwaysUseActiveTerminal": true,
|
||||
"r.bracketedPaste": true,
|
||||
"r.sessionWatcher": true,
|
||||
"[r]": {
|
||||
"editor.defaultFormatter": "REditorSupport.r",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[rmd]": {
|
||||
"editor.defaultFormatter": "REditorSupport.r",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"files.eol": "\n",
|
||||
"terminal.integrated.defaultProfile.linux": "R Terminal",
|
||||
}
|
18
README.md
18
README.md
@ -5,7 +5,7 @@
|
||||
- VSCode 代码编辑器
|
||||
|
||||
VSCode中插件扩展安装:
|
||||
- Python
|
||||
|
||||
- R
|
||||
- R Debugger
|
||||
|
||||
@ -24,13 +24,7 @@
|
||||
|
||||
1. 初始化conda虚拟环境
|
||||
|
||||
创建虚拟环境,可以使用VSCode的Python解释器选择功能创建conda虚拟环境,创建完虚拟环境后选择对应的虚拟环境,使用conda安装对应的R依赖包
|
||||
|
||||
`conda install -c conda-forge r-base r-languageserver r-httpgd r-devtools radian`
|
||||
|
||||
或者使用命令创建虚拟环境并同时下载依赖包
|
||||
|
||||
`conda create -p .condarc -c conda-forge r-base r-languageserver r-devtools r-httpgd radian`
|
||||
`conda create -p .conda -c conda-forge r-base r-languageserver r-devtools r-httpgd radian`
|
||||
|
||||
2. 初始化R Debugger
|
||||
|
||||
@ -40,15 +34,15 @@
|
||||
|
||||
`devtools::install_github("ManuelHentschel/vscDebugger")`
|
||||
|
||||
> [!NOTE]
|
||||
> 此操作需要访问Github平台以获取源码编译安装,请确保 github.com 可正常访问
|
||||
> [!NOTE]
|
||||
> 此操作需要访问Github平台以获取源码编译安装,请确保 github.com 可正常访问
|
||||
|
||||
3. 库的安装
|
||||
|
||||
在当前的conda环境下,
|
||||
|
||||
使用`conda search conda-forge::r-包名` 搜索对应的包
|
||||
使用`conda search -p .conda -c conda-forge r-包名` 搜索对应的包
|
||||
|
||||
使用`conda install conda-forge::r-包名` 安装对应的包
|
||||
使用`conda install -p .conda -c conda-forge r-包名` 安装对应的包
|
||||
|
||||
或者采用R通用的安装(CRAN)
|
||||
|
Loading…
x
Reference in New Issue
Block a user