packages: packages()

Description Usage Arguments Details Examples

View source: R/packages.R

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

1

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

1
2
3
4
5
## Not run: 
packages("dplyr", "ggplot2", "rvest", "magrittr")
packages("dplyr::", "Rdatatable/data.table")

## End(Not run)

easypackages documentation built on May 2, 2019, 3:35 p.m.