Joana Carvalho
Joana Carvalho

Reputation: 99

install.packages(“car”) on R 3.0.2 fails in Ubuntu 14.04

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

Upvotes: 2

Views: 3551

Answers (2)

Ben Bolker
Ben Bolker

Reputation: 226172

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 ...

Upvotes: 4

Mahmut Ali ÖZKURAN
Mahmut Ali ÖZKURAN

Reputation: 1140

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

install.packages("car", dependencies=TRUE, repos='http://cran.rstudio.com/')

Upvotes: 2

Related Questions