pull {rpact}R Documentation

Extract a single parameter

Description

Fetch a parameter from a parameter set.

Usage

pull(x, var, output)

## S3 method for class 'ParameterSet'
pull(x, var = -1, output = c("named", "value", "list"))

obtain(x, var, output)

## S3 method for class 'ParameterSet'
obtain(x, var = -1, output = c("named", "value", "list"))

fetch(x, var, output)

## S3 method for class 'ParameterSet'
fetch(x, var = -1, output = c("named", "value", "list"))

Arguments

x

The ParameterSet object to fetch from.

var

A variable 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 quasiquotation (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)


[Package rpact version 4.0.0 Index]