Learn R Programming

neldermead (version 1.0-13)

optimget: Queries an optimization option list

Description

This function allows to make queries on an existing optimization option list. This list must have been created and updated by the optimset function. The optimget allows to retrieve the value associated with a given key.

Usage

optimget(options = NULL, key = NULL, value = NULL)

Value

Return options$key if key is found in options. Return

value, otherwise.

Arguments

options

A list created or modifies by optimset.

key

A single character string, which should be the name of the field in options to query (case insensitive).

value

A default value.

Author

Author of Scilab neldermead module: Michael Baudin (INRIA - Digiteo)

Author of R adaptation: Sebastien Bihorel (sb.pmlab@gmail.com)

Details

key is matched against the field names of options using grep and a case-insensitive regular expression. If key is not found in options, the function returns NULL. If several matches are found, optimget is stopped.

See Also

optimset

Examples

Run this code
  opt <- optimset(method='fminsearch')
  optimget(opt,'Display')
  optimget(opt,'abc','!@')

Run the code above in your browser using DataLab