I'm working on a package for a Random Forest Model.
The code works fine interactively but when I try to run a check of the code for the package a number of errors pop up. All of the packages are attached prior to adding library(DMwR)
** byte-compile and prepare package for lazy loading
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'nlme'
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 'foreign'
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'MASS'
Error: package or namespace load failed for 'energy' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'boot'
Failed with error: 'package 'lattice' required by 'caret' could not be found'
Error: package or namespace load failed for 'xgboost' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'Matrix'
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'nlme'
Error : package 'lattice' required by 'DMwR' could not be found