fetch.ParameterSet: Extract a single parameter

View source: R/class_core_parameter_set.R

obtainR Documentation

Extract a single parameter

Description

Fetch a parameter from a parameter set.

Usage

obtain(x, ..., output)

## S3 method for class 'ParameterSet'
obtain(x, ..., output = c("named", "labeled", "value", "list"))

fetch(x, ..., output)

## S3 method for class 'ParameterSet'
fetch(x, ..., output = c("named", "labeled", "value", "list"))

Arguments

x

The ParameterSet object to fetch from.

...

One or more variables specified as:

  • a literal variable name

  • a positive integer, giving the position counting from the left

  • a negative integer, giving the position counting from the right. The default returns the last parameter. This argument is taken by expression and supports quasi-quotation (you can unquote column names and column locations).

output

A character defining the output type as follows:

  • "named" (default) returns the named value if the value is a single value, the value inside a named list otherwise

  • "value" returns only the value itself

  • "list" returns the value inside a named list

Examples

## Not run: 
getDesignInverseNormal() |> fetch(kMax)
getDesignInverseNormal() |> fetch(kMax, output = "list")

## End(Not run)


rpact documentation built on March 4, 2026, 5:06 p.m.