Check the Availability of a PackageSource:
Check the Availability of a Package
needs() is designed for use inside other functions in your own package
to check for the availability of a suggested package.
If the required packages are not available and R is running interactively, the user will be asked to install the packages.