View source: R/checkPackages.R
checkPackages | R Documentation |
Checks if a package is installed without loading it. Returns a logical vector with TRUE
or FALSE
for each package checked.
checkPackages( ..., plotmodule = NULL, add = c("tools", "devtools", "formatR", "highlight", "shiny", "shinydashboard", "shinydashboardPlus", "shinyWidgets", "DT", "sortable", "base64enc"), error = FALSE ) installPackages( plotmodule = NULL, add = c("tools", "devtools", "formatR", "highlight", "shiny", "shinydashboard", "shinydashboardPlus", "shinyWidgets", "DT", "sortable", "base64enc") )
... |
character: name(s) of package |
plotmodule |
character: name(s) of plot modules to check for packages |
add |
character: names of default packages to check (default: |
error |
logical: should a error thrown if one or more package are missing? (default: |
TRUE
if successful otherweise an error will be thrown
checkPackages("graphics", add=NULL) # checks if 'graphics' is installed if (interactive()) checkPackages("graphics") # checks if 'graphics', 'shiny', ... are installed if (interactive()) installPackages() # installs all packages to show ALL plots
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.