Learn R Programming

PkgsFromFiles (version 0.5)

pff_check_install_pkgs: Checks and installs a single package

Description

This function will check if input package in pkg.in is installed and, if not, installs it from a chosen repository

Usage

pff_check_install_pkgs(pkg.in, my.available.packages,
  my.library.path = .libPaths()[1],
  my.repository = "https://cloud.r-project.org")

Arguments

pkg.in

Name of the package to be installed

my.available.packages

Names of locally available (installed) packages

my.library.path

Library to search for installed packages (default = .libPaths()[1])

my.repository

Url of CRAN repository (default = "https://cloud.r-project.org" )

Value

A dataframe with information about the result of the installation

Examples

Run this code
# NOT RUN {
pff_check_install_pkgs('dplyr')
# }

Run the code above in your browser using DataLab