历史版本的R包链接在这里: https://cran.r-project.org/src/contrib/Archive/
方法一:源码安装
packageurl <- "http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.9.1.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
方法二:CMD命令安装
wget http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.9.1.tar.gz
R CMD INSTALL ggplot2_0.9.1.tar.gz
方法三: devtools安装
require(devtools)
install_version("ggplot2", version = "0.9.1", repos = "http://cran.us.r-project.org")
参考:
https://stackoverflow.com/questions/17082341/installing-older-version-of-r-package
查看已安装R包的版本:
library(XXXX)
sessionInfo()
网友评论