I tried to install a package, using
install.packages("foobarbaz")
but received the warning
Warning message:
package 'foobarbaz' is not available (for R version x.y.z)
Why doesn't R think that the package is available?
See also these questions referring to specific instances of this problem:
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?
https://stackoverflow.com/questions/21580661/installing-predictabel-package-on-r-2-15-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://stackoverflow.com/questions/31439092/package-dplyr-is-not-available-for-r-version-3-1-1
devtools + GitHub. These 3 lines (helped me on this error) were not yet mentioned:
I made the mistake of forgetting to put
repos=NULL
when installing the R package from source code. In this case the error message is slightly misleading:package 'foobarbaz' is not available (for R version x.y.z)
The problem was not the version of R, it was the
repos
parameter. I didinstall.packages('path/to/source/code/of/foobarbaz', type='source', repos=NULL)
which worked for me in this occasion.Hope this helps someone.
I encountered the same problem on installing package "sentiment". Started Searching and tried many commands. Finally the package installed using following command:
I fixed this error on Ubuntu by carefully following the instructions for installing R. This included:
deb http://cran.utstat.utoronto.ca/bin/linux/ubuntu trusty/
to my /etc/apt/sources.list filesudo apt-get update
sudo apt-get install r-base-dev
For step 1 you can chose any CRAN download mirror in place of my University of Toronto one if you would like.
It almost always works for me when I use bioconductor as source and then invoke biocLite. Example:
This saved me a lot of time debugging what's wrong. In many cases are just mirrors out of date. This function can install multiple packages with their dependencies using
https://cran.rstudio.com/
: