check_and_load_package {webdav} | R Documentation |
This function checks if a specified package is installed in the R environment. If the package is not installed, it will be automatically installed. After installation (if necessary), the package is loaded into the session.
check_and_load_package(package_name)
package_name |
A string with the name of the package to check and load. |
Invisibly returns 'TRUE' if the package is successfully loaded or installed and loaded. If the installation or loading fails, an error will be raised.
check_and_load_package("httr2")
check_and_load_package("xml2")