module_install: Install an outsider module

Description Usage Arguments Details Value See Also Examples

View source: R/install.R

Description

Install a module through multiple different methods: via a code sharing site such as GitHub, a URL, a git repository or local filepath. The function will first install the R package and then build the Docker image. Docker image version is determined by "tag". To avoid pulling the image from DockerHub set "manual" to TRUE.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
module_install(
  repo = NULL,
  url = NULL,
  filepath = NULL,
  git = NULL,
  service = c("github", "bitbucket", "gitlab"),
  tag = "latest",
  manual = FALSE,
  verbose = FALSE,
  force = FALSE,
  update = c("default", "ask", "always", "never")
)

Arguments

repo

Module repo, character.

url

URL to downloadable compressed (zip, tar or bzipped/gzipped) folder of a module, character.

filepath

Filepath to uncompressed directory of module, character.

git

URL to git repository

service

Code-sharing service. Character.

tag

Module version, default latest. Character.

manual

Build the docker image? Default FALSE. Logical.

verbose

Be verbose? Default FALSE.

force

Ignore warnings and install anyway? Default FALSE.

update

Update dependent R packages?

Details

All installation options depend on the installation functions of remotes. E.g. GitHub packages are installed with install_github. See these functions for more details on the R package installation process.

Value

Logical

See Also

Other public: is_module_installed(), module_details(), module_functions(), module_help(), module_import(), module_installed(), module_search(), module_uninstall()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(outsider)
# NOT RUN (too slow for automated testing)
## Not run: 
  if (is_outsider_ready()) {
    # simplest repo
    repo <- 'dombennett/om..hello.world'
    # install
    module_install(repo = repo, force = TRUE, update = 'never')
    # is module_installed?
    (is_module_installed(repo = repo))
    # uninstall
    module_uninstall(repo)
  }

## End(Not run)

outsider documentation built on Dec. 15, 2020, 5:19 p.m.