powered by
Checks if a package is installed without loading it. Returns a logical vector with TRUE or FALSE for each package checked.
TRUE
FALSE
checkPackages( ..., add = c("highlight", "formatR", "shiny", "shinydashboard", "shinydashboardPlus", "DT") )
TRUE if successful otherweise an error will be thrown
character: name(s) of package
character: names of default packages to check (default: c("highlight", "formatR", "shiny", "shinydashboard", "shinydashboardPlus", "DT"))
c("highlight", "formatR", "shiny", "shinydashboard", "shinydashboardPlus", "DT")
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