赞
踩
# R包-直接安装
install.packages("ape")
# Bioconductor包-暗转
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("pkp")
packageurl <- "http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_0.9.1.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
PS: 该方法可以指定版本,并跳过镜像选择
# 在R-console界面
download.file("http://bioconductor.org/packages/release/bioc/src/contrib/BiocInstaller_1.20.1.tar.gz","BiocInstaller_1.20.1.tar.gz") # 或浏览器下载至本地
install.packages("BiocInstaller_1.20.1.tar.gz", repos = NULL)
## RStudio - IDE
packagedir <- choose.files() # 交互
install.packages(packagedir , repos=NULL)
# linux,命令行安装本地包,在shell的终端
sudo R CMD INSTALL package.tar.gz
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。