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
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.
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.
11. R (or another dependency) is out of date and you don't want to update it.
Warning this is not exactly best practice.
DESCRIPTION
file.Remove the offending line with your text editor e.g.
Install from local (i.e. from the parent directory of
DESCRIPTION
) e.g.devtools + GitHub. These 3 lines (helped me on this error) were not yet mentioned:
I encountered the same problem on installing package "sentiment". Started Searching and tried many commands. Finally the package installed using following command:
In the latest R (3.2.3) there is a bug, preventing it some times from finding correct package. The workaround is to set repository manually:
Found solution in other question