Learn R Programming

HKRbook (version 0.1.3)

checkPackages: checkPackages

Description

Checks if a package is installed without loading it. Returns a logical vector with TRUE or FALSE for each package checked.

Usage

checkPackages(
  ...,
  add = c("highlight", "formatR", "shiny", "shinydashboard", "shinydashboardPlus", "DT")
)

Value

TRUE if successful otherweise an error will be thrown

Arguments

...

character: name(s) of package

add

character: names of default packages to check (default: c("highlight", "formatR", "shiny", "shinydashboard", "shinydashboardPlus", "DT"))

Examples

Run this code
checkPackages("graphics", add=NULL)          # checks if 'graphics' is installed
if (interactive()) checkPackages("graphics") # checks if 'graphics', 'shiny', ... are installed

Run the code above in your browser using DataLab