I am trying to run an R application(on Ubuntu 16.04.6) which uses the 'car' package, but everything I tried ended with the following error package ‘car’ is not available (for R version 3.4.4) . What should I do?
-
1The [information page on CRAN](https://cran.r-project.org/web/packages/car/index.html) states that R >= 3.5.0 is required. Do any of the answers [here](https://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa) help? Or see [here](https://cran.r-project.org/bin/linux/ubuntu/) to update your version of R on Ubuntu. – Ben Bolker May 20 '20 at 20:59
-
You could try [older versions](https://cran.r-project.org/src/contrib/Archive/car/) of the car package, not recommended though. Better update your R version, currently 4.0.0 is up to date, you have 3.4.4. – jay.sf May 20 '20 at 22:11
-
To add to the answer by @jay.sf, you can install a specific older version by using the devtools. See [here](https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages) – bzki May 21 '20 at 02:41
-
I've tried a lot of things(what you suggested and another ones), but I can't update the R version. What should I do? I've also update my Ubuntu version. Now it is 18.04 – Sam Stewart May 21 '20 at 21:19
1 Answers
This is a late answer, but maybe others are having the same issue. I just faced the same problem. As said before, the best solution is to update base R, first by uninstalling the current version:
sudo apt-get remove r-base
sudo apt-get remove r-base-core
And then install the newer version using the code here : https://cloud.r-project.org/bin/linux/ubuntu/
After that you need to re-install the libraries (I did that through Rstudio), and installing the latest version of car should be fine.
Alternatively (still repeating what others said) you can install an older version of car if you need to stick with the old R version. For this use install_version() from the devtools library. I did not try that so I cannot give details about the procedure, but possible complications might include the fact that devtools could not not be compatible with old R versions.
I hope it helps.

- 146
- 2
- 12