loadParams: Load Processing Parameters from File

View source: R/batch_management.R

loadParamsR Documentation

Load Processing Parameters from File

Description

Loads neonMicrobe processing parameters from a specified file to a specified environment, usually associated with a processing batch.

Usage

loadParams(params_file, env = NULL, verbose = TRUE)

Arguments

params_file

Filepath to R script containing name-value assignments (e.g. x = 1) that will be used to create an environment.

env

Environment in which to load the parameters. By default (NULL), searches for current processing batch environment. If found, loads parameters there.

verbose

Default TRUE. Whether to print warning message if a parameter has already been assigned in a processing batch.

Examples

## Not run: 
e <- new.env()
ls(e)  # character(0)
loadParams("./R/test_params.R", env=e)
ls(e)  # "x" "y"
get("x", e)  # "hello there"
get("y", e)  # "goodbye now"
loadParams("./R/test_params.R", env=e) # warning

## End(Not run)

claraqin/neonMicrobe documentation built on April 11, 2024, 11:47 a.m.