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

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

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.

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.

Value

Return options$key if key is found in options. Return value, otherwise.

Author(s)

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

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

See Also

optimset

Examples

1
2
3
  opt <- optimset(method='fminsearch')
  optimget(opt,'Display')
  optimget(opt,'abc','!@')