installing source package 'car' ...
** package 'car' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning message:
package 'carData' was built under R version 3.6.3
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'foreign'
Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'car'
removing 'C:/Users/nmuravskaya/AppData/Local/Continuum/anaconda3/Lib/R/library/car'
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\nmuravskaya\AppData\Local\Temp\Rtmpw76Ce1\downloaded_packages’
The drm package hasn't been on CRAN since at least 8 years ago and it doesn't seem to be maintained any more but you can still install it from the GitHub CRAN mirror.
remotes::install_github("cran/drm")
This other error message is telling you that you are missing a package dependency and you need to install it, the problem is that the foreing package requires R >= 4.0.0 so you need to update your R version to be able to install this package.