#如何更新R以及RStudio
##part1 更新R
###section1 win 用包更新R
install.packages("installr")
require(installr)
updateR()
###section2 macOS 用包更新R
install.packages('devtools') #assuming it is not already installed
library(devtools)
install_github('andreacirilloac/updateR')
library(updateR)
updateR(admin_password = 'Admin user password')
###section3 官网下载1
- go to http://www.r-project.org,
- click on ‘CRAN’2,
- then choose the CRAN site you prefer, for example: https://mirror.lzu.edu.cn/CRAN/.
- click on ‘Download R for XXX’ [where XXX is your operating system]
- follow the installation procedures
- restart RStudio
- rejoice
installr函数下载包的速度很慢,我推测可能是因为选择镜像的问题,所以推荐去官网下载。
#part2 更新Rstudio
- open RStudio
- click on “help” and “Check for Updates”
- if there are any updates, you will jump to https://www.rstudio.com/products/rstudio/download/#download
- then choose the version you like and click on “download”
- click on “RStudio ???-XXX”[where ??? is the version and XXX is your operating system]
- it may too slow to download complete, so you should use XUNLEI to download
- follow the installation procedures
- restart RStudio
- rejoice