我试着安装一个包,使用
install.packages("foobarbaz")
却收到了警告
Warning message:
package 'foobarbaz' is not available (for R version x.y.z)
为什么R认为这个包是不可用的?
参见这些问题的具体例子:
My package doesn't work for R 2.15.2
package 'Rbbg' is not available (for R version 2.15.2)
package is not available (for R version 2.15.2)
package doMC NOT available for R version 3.0.0 warning in install.packages
Dependency ‘Rglpk’ is not available for package ‘fPortfolio’
What to do when a package is not available for our R version?
Is the bigvis package for R not available for R version 3.0.1?
package ‘syncwave’/‘mvcwt’ is not available (for R version 3.0.2)
package ‘diamonds’ is not available (for R version 3.0.0)
Is the plyr package for R not available for R version 3.0.2?
Package bigmemory not installing on R 64 3.0.2
package "makeR" is not available (for version 3.0.2)
package ‘RTN’ is not available (for R version 3.0.1)
Trouble Installing geoR package
package ‘twitterR’ is not available (for R version 3.1.0)
How to install 'Rcpp, package? I got "package is not available"
package ‘dataset’ is not available (for R version 3.1.1)
"package ‘rhipe’ is not available (for R version 3.1.2)"
访问https://cran.r-project.org/src/contrib/Archive/。
用Ctrl + F找到要安装的包
单击包名称
确定要安装的版本
打开RStudio
输入"install.packages("https://cran.r-project.org/src/contrib/Archive/[NAME OF PACKAGE]/[VERSION NUMBER].tar.gz", repos = NULL, Type ="source")"
在某些情况下,您需要提前安装几个包才能使用您想要使用的包。
例如,我需要安装7个包(Sejong, hash, rJava, tau, RSQLite, devtools, stringr)来安装KoNLP包。
install.packages('Sejong')
install.packages('hash')
install.packages('rJava')
install.packages('tau')
install.packages('RSQLite')
install.packages('devtools')
install.packages('stringr')
library(Sejong)
library(hash)
library(rJava)
library(tau)
library(RSQLite)
library(devtools)
library(stringr)
install.packages("https://cran.r-project.org/src/contrib/Archive/KoNLP/KoNLP_0.80.2.tar.gz", repos = NULL, type="source")
library(KoNLP)
访问https://cran.r-project.org/src/contrib/Archive/。
用Ctrl + F找到要安装的包
单击包名称
确定要安装的版本
打开RStudio
输入"install.packages("https://cran.r-project.org/src/contrib/Archive/[NAME OF PACKAGE]/[VERSION NUMBER].tar.gz", repos = NULL, Type ="source")"
在某些情况下,您需要提前安装几个包才能使用您想要使用的包。
例如,我需要安装7个包(Sejong, hash, rJava, tau, RSQLite, devtools, stringr)来安装KoNLP包。
install.packages('Sejong')
install.packages('hash')
install.packages('rJava')
install.packages('tau')
install.packages('RSQLite')
install.packages('devtools')
install.packages('stringr')
library(Sejong)
library(hash)
library(rJava)
library(tau)
library(RSQLite)
library(devtools)
library(stringr)
install.packages("https://cran.r-project.org/src/contrib/Archive/KoNLP/KoNLP_0.80.2.tar.gz", repos = NULL, type="source")
library(KoNLP)