Learn R Programming

SpaDES.core (version 2.0.5)

moduleCodeFiles: Extract the full file paths for R source code

Description

This can be used e.g., for Caching, to identify which files have changed.

Usage

moduleCodeFiles(paths, modules)

Value

character vector of file paths.

Arguments

paths

An optional named list with up to 4 named elements, modulePath, inputPath, outputPath, and cachePath. See details. NOTE: Experimental feature now allows for multiple modulePaths to be specified in a character vector. The modules will be searched for sequentially in the first modulePath, then if it doesn't find it, in the second etc.

modules

A named list of character strings specifying the names of modules to be loaded for the simulation. Note: the module name should correspond to the R source file from which the module is loaded. Example: a module named "caribou" will be sourced form the file caribou.R, located at the specified modulePath(simList) (see below).