loadOrInstall(package, dependencies="Depends",...)install.packages.require, install.packages.TRUE if all packages are loaded sucessfully. If FALSE, its "failed" attribute contains a vector of package names that failed to be loaded.require to see if the package can be loaded. If not, it calls install.packages.
Then require is called again for the installed package.library, require, install.packages