Package ‘randomForest ’ is not available (for R version 4.0.2)

Viewed 14562

package ‘randomForest ’ is not available (for R version 4.0.2)

How can I get this kind of "not available" message, since I know for sure that randomForest exists? How can I work around this?

3 Answers
  1. Go to
https://cran.r-project.org/src/contrib/Archive/randomForest/
  1. Right-click version of choice and select "Copy Link Location"
https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-12.tar.gz
  1. Store link location in a variable called urlPackage in R
urlPackage <- "https://cran.r-project.org/src/contrib/Archive/randomForest/randomForest_4.6-12.tar.gz"
  1. Finally, use install.packages
install.packages(urlPackage, repos=NULL, type="source") 

Hope this works for you. Take care.

you need to upload old version of random forest

https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages

you can find the old sources

https://cran.r-project.org/src/contrib/Archive/randomForest/

Michael's solution above should normally work for most people. I tried it but still faced the same issue.

Upgrading to the latest version of R i.e. R (4.1.2) solved the issue for me.

This release has the pre-built package. I hope this helps.

https://cran.r-project.org/bin/macosx/contrib/4.1/

Related