downloadModule: Download a module from a SpaDES module GitHub repository

Description Usage Arguments Details Value Author(s)

Description

Download a .zip file of the module and extract (unzip) it to a user-specified location.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
downloadModule(name, path, version, repo, data, quiet)


  ## S4 method for signature 
## 'character,character,character,character,logical,logical'
downloadModule(name,
  path, version, repo, data, quiet)


  ## S4 method for signature 'character,missing,missing,missing,missing,missing'
downloadModule(name)

## S4 method for signature 'character,ANY,ANY,ANY,ANY,ANY'
downloadModule(name, path, version,
  repo, data, quiet)

Arguments

name

Character string giving the module name.

path

Character string giving the location in which to save the downloaded module.

version

The module version to download. (If not specified, or NA, the most recent version will be retrieved.)

repo

GitHub repository name. Default is "PredictiveEcology/SpaDES-modules", which is specified by the global option spades.moduleRepo.

data

Logical. If TRUE, then the data that is identified in the module metadata will be downloaded, if possible. Default if FALSE.

quiet

Logical. This is passed to download.file. Default is FALSE.

Details

Currently only works with a public GitHub repository, where modules are in a modules directory in the root tree on the master branch.

NOTE: the default is to overwrite any existing files in the case of a conflict.

Value

A list of length 2. The first elemet is a character vector containing a character vector of extracted files for the module. The second element is a tbl with details about the data that is relevant for the function, including whether it was downloaded or not, whether it was renamed (because there was a local copy that had the wrong file name).

Author(s)

Alex Chubaty



Search within the SpaDES package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.