powered by
Checks for package availability and provides informative error message.
check_package(pkg, reason = "this functionality")
TRUE invisibly if package is available, otherwise stops with error.
Character string with package name.
Character string explaining why the package is needed.
check_package("stats", "basic statistics")
Run the code above in your browser using DataLab