Skip to contents

R6 class representing the set of parameters used in an analysis

R6 class representing the set of parameters used in an analysis

Methods


Method new()

Create a new set of parameters.

Usage

ParamList$new(defaults = list())

Arguments

defaults

Named list of default values. Names are the parameters, and the values will be their default.

Returns

An object that will store all future values of analysis parameters.


Method set()

Set the value of a parameter

Usage

ParamList$set(id, value, description = "", postpone = FALSE)

Arguments

id

The name of the parameter to be set.

value

The value the parameter should taken henceforth; if missing, it will take the default value.

description

A string describing what the purpose of the parameter is.

div

Logical, whether to mention in the markdown report what the value has been set to.


Method get()

Get the value that the parameter is currently set to.

Usage

ParamList$get(id, override)

Arguments

id

Name of the value you want to access.


Method publish()

Turn the mutable object into a list

Usage

ParamList$publish()


Method describe()

Get a text description of what the setting is, and what value it currently takes.

Usage

ParamList$describe(id)

Arguments

id

Name of the value you want to access.


Method clone()

The objects of this class are cloneable with this method.

Usage

ParamList$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.