R, car package unable to load

2020-01-29 12:03发布

I'm new with R, and I'm having some trouble loading the car library. I use Windows 8.1 (64 bit) and i'm working in 32 bit R environment. I downloaded the library just fine, but when i try to load the car library using library(car) the message i get is:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘quantreg’
Error: package or namespace load failed for ‘car’

This message came up asking for several other libraries besides quantreg. I downloaded some of those other libraries in the hope that it would be enough to run car, but it doesn't stop asking for more libraries.

Has anyone had the same issue? This also happened to some people I know, using different operating systems, mostly Windows, but also Linux.

1条回答
甜甜的少女心
2楼-- · 2020-01-29 12:46

It seems that you did not install the dependencies automatically when you installed car. I'm assuming that you tried installing with Rstudio, which does not automatically install dependencies.

This SO post and this one should help you to install them automatically.

Try reinstalling with the command install.packages("car",dependencies=TRUE).

Additionally, in the future you can check the CRAN page to see the depends, imports, suggests, etc.

查看更多
登录 后发表回答