Learn R Programming

SpaDES (version 1.0.1)

downloadModule: Download a module from a SpaDES module GitHub repository

Description

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

Usage

downloadModule(name, path, version, repo)

## S3 method for class 'character,character,character,character':
downloadModule(name, path,
  version, repo)

## S3 method for class 'character,character,character,missing':
downloadModule(name, path,
  version)

## S3 method for class 'character,character,missing,missing':
downloadModule(name, path)

## S3 method for class 'character,character,missing,character':
downloadModule(name, path,
  repo)

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.modulesRepo.

Value

  • Invisibly, a character vector containing a list of extracted files.

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.