BDMethodList: Create a new BDMethodList object

Description Usage Arguments Value Author(s) See Also Examples

Description

Initializes a new SimpleList of BenchDesign method (BDMethod) objects.

Similar to BDMethod objects, BDMethodList typically do not need to be directly constructed. Because the list of methods is only useful as art of a BenchDesign object, it is more common to simply manipulate the list of methods through calls to the corresponding BenchDesign, e.g. addMethod to add a new method to the list.

The constructor can also be used to access the BDMethodList list of methods in a BenchDesign object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
BDMethodList(..., x = NULL)

## S4 method for signature 'ANY'
BDMethodList(..., x = NULL)

## S4 method for signature 'BenchDesign'
BDMethodList(..., x = NULL)

## S4 method for signature 'SummarizedBenchmark'
BDMethodList(..., x = NULL)

Arguments

...

a named list of BDMethod objects

x

a BenchDesign or SummarizedBenchmark object to extract the list of methods from. (default = NULL)

Value

BDMethodList object

Author(s)

Patrick Kimes

See Also

BDMethodList-class, BenchDesign, BDMethod

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## construct an empty list
bdml <- BDMethodList()

## construct a list with BDMethod objects
bdml <- BDMethodList(m_method = BDMethod(base::mean),
                     s_method = BDMethod(function(x) { x^2 }))
bdml

## construct a BenchDesign with a BDMethodList
bd <- BenchDesign(methods = bdml)

## access the BDMethodList in the BenchDesign
BDMethodList(bd)

areyesq89/SummarizedBenchmark documentation built on Sept. 2, 2021, 4:15 p.m.