Learn R Programming

gsDesignTune (version 0.1.0)

SpendingFamily: SpendingFamily

Description

SpendingFamily

SpendingFamily

Arguments

Value

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

Public fields

members

List of SpendingSpec objects.

Methods


Method new()

Create a new spending family from one or more SpendingSpec.

Usage

SpendingFamily$new(...)

Arguments

...

SpendingSpec objects.


Method expand()

Expand all members to spending settings.

Usage

SpendingFamily$expand()


Method clone()

The objects of this class are cloneable with this method.

Usage

SpendingFamily$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

An R6 class representing a set of spending function specifications. Each family member is a SpendingSpec.

Examples

Run this code
fam <- SpendingFamily$new(
  SpendingSpec$new(gsDesign::sfHSD, par = tune_fixed(-4)),
  SpendingSpec$new(gsDesign::sfLDOF, par = tune_fixed(0))
)
fam$expand()

Run the code above in your browser using DataLab