add_packages: Install and load an R package

Description Usage Arguments Details Value

View source: R/add_package.R

Description

Install and load an R package

Usage

1
add_packages(pkg = NULL, repo = NULL, pub = FALSE)

Arguments

pkg

character Name of a package to be installed/loaded

repo

character Name of the repository from which the package should be installed.

pub

logical variable indicating whether the app be published (see details)

Details

If repo = NULL the package will be installed from the CRAN. Otherwise, repo is a character string that referring to the GitHub account in which the package is located.

When publishing apps on shinyapps.io or shinyServer, attempting to install.packages will result in an error. Calls to install.packages should not be included within an app.

Value

A printed shiny app


teachingApps documentation built on July 1, 2020, 5:58 p.m.