getModule: Simple function to download a SpaDES module as GitHub...

View source: R/getModule.R

getModuleR Documentation

Simple function to download a SpaDES module as GitHub repository

Description

Simple function to download a SpaDES module as GitHub repository

Usage

getModule(
  modules,
  modulePath,
  overwrite = FALSE,
  verbose = getOption("Require.verbose", 1L)
)

Arguments

modules

Character vector of one or more github repositories as character strings that contain SpaDES modules. These should be presented in the standard R way, with account/repository@branch. If account is omitted, then ⁠"PredictiveEcology⁠ will be assumed.

modulePath

A local path in which to place the full module, within a subfolder ... i.e., the source code will be downloaded to here: file.path(modulePath, repository). If omitted, and options(spades.modulePath) is set, it will use getOption("spades.modulePath"), otherwise it will use ".".

overwrite

A logical vector of same length (or length 1) gitRepo. If TRUE, then the download will delete any existing folder with the same name as the repository provided in gitRepo

verbose

Numeric or logical indicating how verbose should the function be. If -1 or -2, then as little verbosity as possible. If 0 or FALSE, then minimal outputs; if 1 or TRUE, more outputs; 2 even more. NOTE: in Require function, when verbose >= 2, also returns details as if returnDetails = TRUE (for backwards compatibility).

See Also

getGithubFile


PredictiveEcology/SpaDES.project documentation built on Dec. 23, 2024, 7:33 a.m.