download_module: Download a module from a repository.

Description Usage Arguments Value Examples

View source: R/module-utils.R

Description

Download and extract a module to the 'modules' folder in the active working directory. If you are using an RStudio project then it will be saved in the 'modules' folder of your project. If the 'modules' folder does not exist, it will be created.

Usage

1
2
3
4
5
6
7
8
download_module(
  name,
  repo = dymiumModulesRepo,
  version,
  force = FALSE,
  remove_download = FALSE,
  path = here::here()
)

Arguments

name

(character(1))
A module name.

repo

(character(1)
A GitHub repository to look for modules. By default, this uses 'dymium-org/dymiumModules' which is the main repository that hosts the package and a public repository for shared modules.

version

(character(1)
Version number of a module. This should follow the following convention, if you want to download the version 1.1.0 of a module then you should type in "1.1.0". If this field is left blank, the latest version of the module will be used.

force

(logical(1))
Default as FALSE. Should the module be downloaded, even though the module already exists locally in path.

remove_download

(logical(1)
Default as FALSE. Whether to delete the downloaded zip file or not.

path

character(1)
Path the newly downloaded module will be saved at. here::here() is used to provide the default value which is is the root folder of the active RStudio project.

Value

path to the module.

Examples

1
2
3
4
5
## Not run: 
  # download an test module.
  download_modules('test', version = '0.0.1')

## End(Not run)

dymium-org/dymiumModules documentation built on May 23, 2020, 10:30 a.m.