View source: R/require.package.R
require.package | R Documentation |
This functions will require the given package. If the package is not installed it will stop execution and print a message to the user instructing them which package to install and which function caused the error.
require.package(package.name, attach = TRUE)
package.name |
A character vector containing the package name. Must be a valid package name installed on the system. |
attach |
Should the package be attached to the search path (as with
|
The function .require.package
is called by internal code. It will
attach the package to the search path (with a warning) only if the
compatibility configuration attach_internal_libraries
is set to
TRUE
. Normally, packages used for loading data are not
needed on the search path, but not loading them might break existing code.
In a forthcoming version this compatibility setting will be removed,
and no packages will be attached to the search path by internal code.
No value is returned; this function is called for its side effects.
library('ProjectTemplate')
## Not run: require.package('PackageName')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.