1

I have a Problem that Looks just like this one installing car but unable to load quantreg. However, the suggested solution didn't work in my case.

Specifically, I wam trying to load the package "car" in R-Studio. I have installed it using the install.packages("car",dependencies=TRUE) command. So all other packages car needs should be installed. However, once I try to load car, it tell me the following:

    Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
    versionCheck = vI[[j]]) : 
    There is no package called ‘pbkrtest’
    In addition: Warning message:
    Package ‘car’ was built under R Version 3.2.5 
    Error: package or namespace load failed for ‘car’

I have also tried the car-installing this way install.packages("package's name", repos=c("http://rstudio.org/_packages", "http://cran.rstudio.com")) but it didn't work either.

Searching the internet didn't return any helpful results otherwise.

I am hoping to find a solution and maybe spare others some time by providing the question (and your answers) if they Encounter the same Problem.

Thank you.

Community
  • 1
  • 1
Helén
  • 11
  • 3
  • What is your operating system? Did you get the package as a pre-built binary? If so upgrading or local install from source are alternatives. – Dirk Eddelbuettel Oct 06 '16 at 14:36
  • I use windows 10, no problems so far. I solved the mentioned problem by updating R. Apperently pbkrtest does not get installed on older R-versions anymore. My solution: updating R to current version (deinstalling R and reinstalling version 3.3.1 - bug in your hair), re-installing car with dependencies. Thank you! – Helén Oct 07 '16 at 10:55

1 Answers1

0

Remove car and the dependency packages minga, nloptr, RcppEigen, lme4, SparseM, MatrixModels, pbkrtest (which you apparently don't have), quantreg using remove.packages(). Shut down R-Studio.

If possible, start R from the command line, as you may see errors here that R-Studio will hide from you. Re-run install.packages( "car" ) and look for errors associated with pbkrtest or other packages. You will see a lot of compiler warnings, but there should be no errors.

Below you will find what I see when, in the process of installing car, the pbkrtest package installs. Just following these steps: uninstalling all of the related packages and reinstalling them may fix your problems. If not, add the output from the install to your question and let us know if you are having the same problem.

* installing *source* package \u2018pbkrtest\u2019 ...
** package \u2018pbkrtest\u2019 successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package \u2018pbkrtest\u2019
finding HTML links ... done
DATA-beets                              html  
DATA-budworm                            html  
KRmodcomp                               html  
finding level-2 HTML links ... done
PBmodcomp                               html  
PBrefdist                               html  
getKR                                   html  
get_ddf_Lb                              html  
model2restrictionMatrix                 html  
pbkrtest-internal                       html  
vcovAdj                                 html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (pbkrtest)
Making 'packages.html' ... done
* installing *source* package \u2018car\u2019 ...
** package \u2018car\u2019 successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package \u2018car\u2019
finding HTML links ... done
AMSsurvey                               html
Adler                                   html  
Angell                                  html  
Anova                                   html  
Anscombe                                html  
Baumann                                 html  
Bfox                                    html  
Blackmore                               html  
Boot                                    html  
Boxplot                                 html  
Burt                                    html  
CanPop                                  html  
Chile                                   html  
Chirot                                  html  
Contrasts                               html  
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/Contrasts.Rd:68: missing file link \u2018contr.treatment\u2019
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/Contrasts.Rd:68: missing file link \u2018contr.sum\u2019
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/Contrasts.Rd:69: missing file link \u2018contr.helmert\u2019
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/Contrasts.Rd:69: missing file link \u2018contr.poly\u2019
Cowles                                  html  
Davis                                   html  
DavisThin                               html  
Depredations                            html  
Duncan                                  html  
Ellipses                                html  
Ericksen                                html  
Florida                                 html  
Freedman                                html  
Friendly                                html  
Ginzberg                                html  
Greene                                  html  
Guyer                                   html  
Hartnagel                               html  
Highway1                                html  
KosteckiDillon                          html  
Leinhardt                               html  
LoBD                                    html  
Mandel                                  html  
Migration                               html  
Moore                                   html  
Mroz                                    html  
OBrienKaiser                            html  
Ornstein                                html  
Pottery                                 html  
Prestige                                html  
Quartet                                 html  
Robey                                   html  
SLID                                    html  
Sahlins                                 html  
Salaries                                html  
ScatterplotSmoothers                    html  
Soils                                   html  
States                                  html  
Transact                                html  
TransformationAxes                      html  
UN                                      html  
USPop                                   html  
Vocab                                   html  
WeightLoss                              html  
Womenlf                                 html  
Wong                                    html  
Wool                                    html  
avPlots                                 html  
bcPower                                 html  
bootCase                                html  
boxCox                                  html  
boxCoxVariable                          html  
boxTidwell                              html  
car-deprecated                          html  
car-internal                            html  
car-package                             html  
carWeb                                  html  
ceresPlots                              html  
compareCoefs                            html  
crPlots                                 html  
deltaMethod                             html  
densityPlot                             html  
dfbetaPlots                             html  
durbinWatsonTest                        html  
hccm                                    html  
hist.boot                               html  
infIndexPlot                            html  
influencePlot                           html  
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/influencePlot.Rd:62: missing file link \u2018cooks.distance\u2019
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/influencePlot.Rd:62: missing file link \u2018rstudent\u2019
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/influencePlot.Rd:63: missing file link \u2018hatvalues\u2019
invResPlot                              html  
invTranPlot                             html  
leveneTest                              html  
leveragePlots                           html  
linearHypothesis                        html  
logit                                   html  
marginalModelPlot                       html  
mcPlots                                 html  
ncvTest                                 html  
outlierTest                             html  
panel.car                               html  
plot.powerTransform                     html  
powerTransform                          html  
qqPlot                                  html  
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/qqPlot.Rd:114: missing file link \u2018qqplot\u2019
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/qqPlot.Rd:115: missing file link \u2018qqline\u2019
recode                                  html  
regLine                                 html  
residualPlots                           html  
scatter3d                               html  
scatterplot                             html  
scatterplotMatrix                       html  
showLabels                              html  
sigmaHat                                html  
skewPower                               html  
some                                    html  
Rd warning: /tmp/RtmpHIzBAB/R.INSTALL69be5853f984/car/man/some.Rd:47: missing file link \u2018tail\u2019
spreadLevelPlot                         html  
subsets                                 html  
symbox                                  html  
testTransform                           html  
vif                                     html  
wcrossprod                              html  
which.names                             html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (car)
Making 'packages.html' ... done

The downloaded source packages are in
\u2018/tmp/RtmpeVpYkV/downloaded_packages\u2019
Daniel Wisehart
  • 1,489
  • 12
  • 31