实验时间:2022.3.10
目录
一、安装R语言
The Comprehensive R Archive Network (tsinghua.edu.cn)
打开安装包,一直下一步即可。
二、安装R Studio
Download the RStudio IDE - RStudio
打开安装包,一直下一步即可。
三、解决install包不能open URL
3.1 install包(有效,R Studio也可以)
解决办法
#更改https为http,虽然我们浏览器不管是http、https都能打开
options(download.file.method="libcurl")
#下载并且加载包,每次install加上一句
#install.packages("markdown")
library(markdown)
或者进入到R的安装目录,编辑/etc/Rprofile.site
添加 options(download.file.method="libcurl")
问题陈述
3.2 R Studio设置(亲测无效)
Please check the following to be able to install new packages:
1- In Tools -> Global Options -> Packages, uncheck the "Use Internet Explorer library/proxy for HTTP" option,
2- In Tools -> Global Options -> Packages, change the CRAN mirror to "0- Cloud - Rstudio, automatic redirection to servers worldwide"
3- Restart Rstudio.
4- Have fun!
参考文章:installation - R - when trying to install package: InternetOpenUrl failed - Stack Overflow
Unable to install packages in latest version of RStudio and R Version.3.1.1 - Stack Overflow