1. R 下载和安装
1.1 下载
网址:https://www.r-project.org/
选择一个镜像地址下载
选择对应的版本
一般选择base即可
1.2 安装
下载安装包后按提示安装即可。注意尽量不要安装在C盘/系统盘,可能会出现其他错误,不只是占用系统盘空间。
2. VSCODE 配置
2.1 安装R拓展
2.2 安装R语言辅助功能包
首先打开或新建任意一个R文件 (***.r)
一般会弹出这个提示,建议安装
可以看到,有比较实用的功能,比如颜色的直接选择。
安装了如下内容:
package 'ps' successfully unpacked and MD5 sums checked
package 'crayon' successfully unpacked and MD5 sums checked
package 'remotes' successfully unpacked and MD5 sums checked
package 'evaluate' successfully unpacked and MD5 sums checked
package 'highr' successfully unpacked and MD5 sums checked
package 'xfun' successfully unpacked and MD5 sums checked
package 'yaml' successfully unpacked and MD5 sums checked
package 'lazyeval' successfully unpacked and MD5 sums checked
package 'pkgbuild' successfully unpacked and MD5 sums checked
package 'lifecycle' successfully unpacked and MD5 sums checked
package 'R.methodsS3' successfully unpacked and MD5 sums checked
package 'R.oo' successfully unpacked and MD5 sums checked
package 'R.utils' successfully unpacked and MD5 sums checked
package 'processx' successfully unpacked and MD5 sums checked
package 'backports' successfully unpacked and MD5 sums checked
package 'cyclocomp' successfully unpacked and MD5 sums checked
package 'digest' successfully unpacked and MD5 sums checked
package 'glue' successfully unpacked and MD5 sums checked
package 'knitr' successfully unpacked and MD5 sums checked
package 'rex' successfully unpacked and MD5 sums checked
package 'brew' successfully unpacked and MD5 sums checked
package 'cli' successfully unpacked and MD5 sums checked
package 'commonmark' successfully unpacked and MD5 sums checked
package 'desc' successfully unpacked and MD5 sums checked
package 'purrr' successfully unpacked and MD5 sums checked
package 'rlang' successfully unpacked and MD5 sums checked
package 'stringr' successfully unpacked and MD5 sums checked
package 'cpp11' successfully unpacked and MD5 sums checked
package 'magrittr' successfully unpacked and MD5 sums checked
package 'R.cache' successfully unpacked and MD5 sums checked
package 'rprojroot' successfully unpacked and MD5 sums checked
package 'vctrs' successfully unpacked and MD5 sums checked
package 'callr' successfully unpacked and MD5 sums checked
package 'collections' successfully unpacked and MD5 sums checked
package 'fs' successfully unpacked and MD5 sums checked
package 'jsonlite' successfully unpacked and MD5 sums checked
package 'lintr' successfully unpacked and MD5 sums checked
package 'R6' successfully unpacked and MD5 sums checked
package 'roxygen2' successfully unpacked and MD5 sums checked
package 'stringi' successfully unpacked and MD5 sums checked
package 'styler' successfully unpacked and MD5 sums checked
package 'xml2' successfully unpacked and MD5 sums checked
package 'xmlparsedata' successfully unpacked and MD5 sums checked
package 'languageserver' successfully unpacked and MD5 sums checked
可以自行安装其他库,如:
在任意R文件中
install.packages("ggplot2")
2.3 DEBUG
添加Debugger
遇到问题可以使用:文章来源:https://www.toymoban.com/news/detail-789972.html
ctrl + shift + p , 然后输入 :文章来源地址https://www.toymoban.com/news/detail-789972.html
r.debugger.updateRPackage
到了这里,关于R语言下载安装及VScode配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!