install.packages("installr") require(installr)或者library("installr") updateR()
转载自:https://www.zhihu.com/question/43471741