problem with car package and library

Hi, I am a new user of R studio and I have a problem with loading package car. I know there was the same question but I have no idea how to change the libpath (it was part of the solution to the problem what I found). I would be glad for any help. Thanks.

library("car")
Error: package or namespace load failed for ‘car’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘hms’
In addition: Warning message:
package ‘car’ was built under R version 3.6.2

The error message is self explanatory, you are missing a package dependency, try installing it first.

install.packages("hms")

I installed it and still the same :confused:

If you have correctly installed hms it can't be exactly the same message, please post the new error message your are getting

I put in the r studio >install.packages("hms") and it was installed.
but still the same message:

library("car")
Error: package or namespace load failed for ‘car’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘hms’
In addition: Warning message:
package ‘car’ was built under R version 3.6.2

If it is asking again for hms package then it was not successfully installed, did you get any message wile installing it? Have you tried restarting your R session before loading the package?

I just restarted it and did it again. I am not sure what to do with this message- There is a binary version available but the source version is later: binary source needs_compilation hms

The whole again:

install.packages("hms")

There is a binary version available
but the source version is later:
binary source needs_compilation
hms 0.5.2 0.5.3 FALSE

installing the source package ‘hms’

trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.3.tar.gz'
Content type 'application/x-gzip' length 134669 bytes (131 KB)
downloaded 131 KB

  • installing source package 'hms' ...
    ** package 'hms' successfully unpacked and MD5 sums checked
    ** using staged installation
    Error in .read_description(dfile) :
    file 'C:/Users/Káa/AppData/Local/Temp/RtmpEP6na4/R.INSTALL280c681c5c99/hms/DESCRIPTION' does not exist
    ERROR: installing package DESCRIPTION failed for package 'hms'
  • removing 'C:/Program Files/R/R-3.6.1/library/hms'
    Warning in install.packages :
    installation of package ‘hms’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Káa\AppData\Local\Temp\Rtmpuw6ih2\downloaded_packages’

library("hms")
Error in library("hms") : there is no package called ‘hms’
library("car")
Loading required package: carData
Error: package or namespace load failed for ‘car’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘hms’
In addition: Warning message:
package ‘car’ was built under R version 3.6.2

If you want to install the source version you need to have Rtools installed in your system, other wise install the binary version, also you might have some issues because of your Windows user name, it appears to contain non ASCII characters and R doesn't like that.

I installed Rtools and changed Windows user but I do not know how to install the binary version. Please could you help me?

When you run this command, if the source version is later, it is going to ask you if you want to install from source, just answer no and it is going to install the binary version.

install.packages("hms")

If you get a different error message, post it here as it is (with out omitting anything).

Oh, thank you. It is ok now. Thank you sooooo much. :blush: :blush: :blush: :blush: :blush:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.