check_for_package | R Documentation |
Some functions not pertaining to the package core require additional libraries. These libraries are listed as *suggested* in the 'DESCRIPTION' When such a function is called by a user who does not have the respective libraries installed, we should notice that and notify the user. This is the purpose of this *function* 'check_for_package'.
check_for_package(package, stop = TRUE)
package |
Name of the package to check for. |
stop |
Toggle whether an error should be thrown ('TRUE') or a warning generated ('FALSE'). |
The function checks if *package* is installed and loaded. If not, it either produces a warning or throws an error, depending on the value of *stop*.
‘TRUE' if the package was found. 'FALSE' if it wasn’t found and *stop* is 'FALSE'. Otherwise, an error will be thrown.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.