Learn R Programming

gsDesignTune (version 0.1.0)

tune_dep: Dependent tuning specification

Description

tune_dep() defines candidates for one argument as a function of other arguments.

Usage

tune_dep(depends_on, map)

Value

A gstune_spec object.

Arguments

depends_on

Character vector of argument names this specification depends on.

map

A function returning either a tune_*() specification or a fixed value. The function should have arguments matching depends_on (or use ...).

Examples

Run this code
# sfupar depends on sfu
tune_dep(
  depends_on = "sfu",
  map = function(sfu) {
    if (identical(sfu, gsDesign::sfLDOF)) tune_fixed(0) else tune_seq(-4, 4, 9)
  }
)

Run the code above in your browser using DataLab