Learn R Programming

gsDesignTune (version 0.1.0)

SpendingSpec: SpendingSpec

Description

SpendingSpec

SpendingSpec

Arguments

Value

An R6 class generator. Use $new() to create a SpendingSpec object.

Public fields

fun

Spending function (callable with signature (alpha, t, param)).

fun_label

Label captured from the constructor call (used for plotting).

par

Tuning specification for the spending parameter.

Methods


Method new()

Create a new spending specification.

Usage

SpendingSpec$new(fun, par = tune_fixed(NULL))

Arguments

fun

Spending function.

par

Spending parameter specification.


Method expand()

Expand to a list of spending settings (fun + concrete parameter values).

Usage

SpendingSpec$expand()


Method clone()

The objects of this class are cloneable with this method.

Usage

SpendingSpec$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

An R6 class representing a single spending function (fun) and a tuning specification for its parameter (par).

Examples

Run this code
spec <- SpendingSpec$new(gsDesign::sfHSD, par = tune_seq(-4, -2, length_out = 2))
spec$expand()

Run the code above in your browser using DataLab