Description Usage Arguments Value Author(s) See Also Examples
Takes a BenchDesign
object, the name of an
existing method, and new parameter specifications,
and returns a modified BenchDesign
object with new methods added. The named method is "expanded" to mutliple methods
according to the specified set of parameters.
1 2 | expandMethod(bd, label, params, onlyone = NULL, .replace = FALSE,
.overwrite = FALSE)
|
bd |
|
label |
Character name of method to be expanded. |
params |
Named list of quosure lists specifying the label of the
new methods to be added to the |
onlyone |
Character name of a parameter to be modified. Only specify
if just a single parameter should be replaced in the original
method definition. Ignored if |
.replace |
Logical whether original |
.overwrite |
Logical whether to overwrite the existing list of
parameters ( |
Modified BenchDesign
object with new methods with
specified parameters added.
Patrick Kimes
modifyMethod
, addMethod
, dropMethod
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## empty BenchDesign
bench <- BenchDesign()
## add basic 'padjust' method
bench <- addMethod(bench, label = "padjust",
func = p.adjust,
params = rlang::quos(p = pval, method = "none"))
## modify multiple parameters - params is a list of quosure lists
newparams <- list(bonf = rlang::quos(p = round(pval, 5), method = "bonferonni"),
bh = rlang::quos(p = round(pval, 3), method = "BH"))
bench_exp <- expandMethod(bench, label = "padjust", params = newparams)
BDMethodList(bench_exp)
## only modify a single parameter - params is a quosure list
newparams <- rlang::quos(bonf = "bonferonni", BH = "BH")
bench_exp <- expandMethod(bench, label = "padjust", onlyone = "method", params = newparams)
BDMethodList(bench_exp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.