Having trouble loading alr3 package

readxl

#1

Hello everyone, I tried to load a package called 'alr3' when I am taking an online course. But I got this error message when trying to load this package. I have already had car package installed. How do I resolve this?

library(alr3)
Loading required package: 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 ‘readxl’
Error: package ‘car’ could not be loaded

Here's what happened when I tried to load the car package:

 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 ‘readxl’

I really appreciate any help, thank you.

New issue, I managed to install the readxl package, but when I tried to load the alr3 package again, I got the following error message that prevent me from proceeding:

Loading required package: car
Error: package or namespace load failed for ‘car’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/readxl/libs/readxl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/readxl/libs/readxl.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/readxl/libs/readxl.so
  Reason: Incompatible library version: readxl.so requires version 3.5.0 or later, but libR.dylib provides version 3.4.0
Error: package ‘car’ could not be loaded