2

I'm trying to do some linear regression models and I really need the package "car" but I can't install it.

Warning message: package ‘car’ is not available (for R version 3.0.2)

Anyone knows what can I do to solve this?

Thank you very much

Mahmut Ali ÖZKURAN
  • 1,120
  • 2
  • 23
  • 28

2 Answers2

4

Your proximal problem is that the current version of car on CRAN depends on R >= 3.2.0.

Farther upstream, the problem is that Ubuntu releases ship with the version of R that was current at the release time, and R evolves very quickly. Your best bet is to follow the updating/installation directions for Ubuntu on CRAN, i.e. add

deb https://cloud.r-project.org/bin/linux/ubuntu trusty/

to /etc/apt/sources.list (or via whatever package management tools you prefer), then sudo apt-get update, sudo apt-get upgrade.

If it's absolutely necessary that you stick with that version of R, it's possible to download and install older versions from the archived versions of car on CRAN, but it's a bit of a rabbit hole ...

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
2

It is possible that your default repository did not have "car" package. Try

install.packages("car", dependencies=TRUE, repos='http://cran.rstudio.com/')
Mahmut Ali ÖZKURAN
  • 1,120
  • 2
  • 23
  • 28