install_packages: install_packages()

Description Usage Arguments Details Examples

View source: R/install_packages.R

Description

Installs one or more packages. Similar to utils::install.packages, but you may supply either package names and 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

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.

Examples

1
2
3
4
## Not run: 
install_packages("dplyr", "ggplot2", "rvest", "magrittr")

## End(Not run)

Example output

Warning message:
In file(con, "r") : cannot open file '/proc/stat': Permission denied
Installing package into/usr/local/lib/R/site-library(aslibis unspecified)
Warning in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  : 
  unable to install packages
Installing package into/usr/local/lib/R/site-library(aslibis unspecified)
Warning in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  : 
  unable to install packages
Installing package into/usr/local/lib/R/site-library(aslibis unspecified)
Warning in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  : 
  unable to install packages
Installing package into/usr/local/lib/R/site-library(aslibis unspecified)
Warning in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos,  : 
  unable to install packages

--------------------------------------------------
The following packages did not install successfully: 

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