这里写自定义目录标题
问题:使用R安装某工具包时报错:
Error in install.packages(“xxx”, dependencies = True) :
没有"install.packages"这个函数
解决方案:
清华镜像站 R包地址
https://mirrors.tuna.tsinghua.edu.cn/CRAN/
我先查看下自己R的版本号(windows 环境,4.2)
因此进入https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/4.2/
可以通过以下两种方法安装:
一是直接从镜像安装,二是本地安装
- 镜像:
install.packages(“https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/4.2/tidyxl_1.0.8.zip”, repos=NULL) - 本地安装:
install.packages(“…zip”, repos = NULL)
程序包‘xxxx’打开成功,MD5和检查也通过
完美解决!!