packages {easypackages}R Documentation

packages()

Description

Loads one or more packages, and installs them after a user prompt if they are not already installed. You may supply either package names or package_obj objects to this function. You can install Github packages by supplying username/repo to this function, or username$repo for Bitbucket packages.

Usage

packages(..., prompt = TRUE)

Arguments

...

one or more package names or package_obj objects

prompt

(default is TRUE) prompt the user before installing packages? For interactive use keeping the default makes the most sense. For interactive scripts, or scripts that you are sharing with those you trust, it may make more sense to switch this to FALSE.

Details

package_obj allows you to supply it an install function if the package isn't on CRAN or in a public GitHub or Bitbucket repo.

You may also add :: to the end of a package name to load the package instead of attaching the package (this means that the package will not be added to the search list, but will be available to access via the :: operator).

Examples

## Not run: 
packages("dplyr", "ggplot2", "rvest", "magrittr")
packages("dplyr::", "Rdatatable/data.table")

## End(Not run)

[Package easypackages version 0.1.0 Index]