BenchDesign {SummarizedBenchmark} | R Documentation

## Create a new BenchDesign object

### Description

Initializes a new BenchDesign object of benchmarking methods and data.

The BenchDesign class serves as the core container for methods and data used for benchmarking in the SummarizedBenchmark package. The object can be initialized with a list of methods ot be benchmarked, a default benchmarking data set, both or neither. Methods must be passed to the constructor as `BDMethod` or `BDMethodList` objects.

The constructor can also be used to access the BenchDesign stored in a SummarizedBenchmark object.

### Usage

    BenchDesign(..., methods = NULL, data = NULL)

    ## S4 method for signature 'ANY'
    BenchDesign(..., methods = NULL, data = NULL)

    ## S4 method for signature 'SummarizedBenchmark'
    BenchDesign(methods, data)

### Arguments

`...` | named set of `BDMethod` objects and/or unnamed `BenchDesign` objects. Only the methods of any `BenchDesign` object will be used, and the data slot of the objects will be ignored.
`methods` | named set of `BDMethod` objects and/or unnamed `BenchDesign` objects as a list. (default = NULL)
`data` | optional data.frame or other list object to be used in the benchmark. (default = NULL)

### Value

`BenchDesign` object.

### Author(s)

Patrick Kimes

### See Also

`BenchDesign-class`, `BDMethod`, `BDMethodList`

### Examples

    ## with no input
    bd <- BenchDesign()

    ## with data - data must be a named argument
    datadf <- data.frame(pval = runif(20), x1 = rnorm(20))
    bd <- BenchDesign(data = datadf)

    ## with two methods and data
    method_bh <- BDMethod(stats::p.adjust, params = rlang::quos(p = pval, method = "BH"))
    method_bf <- BDMethod(stats::p.adjust, params = rlang::quos(p = pval, method = "bonferroni"))
    bd <- BenchDesign(bh = method_bh, bonf = method_bf,
                      data = datadf)

    ## with BDMethodList and data
    bdml <- BDMethodList(bh = method_bh, bonf = method_bf)
    bd <- BenchDesign(methods = bdml, data = datadf)

[Package SummarizedBenchmark version 2.4.0 Index]