\inputencoding{utf8}
\HeaderA{optimget}{Queries an optimization option list}{optimget}
\keyword{method}{optimget}
%
\begin{Description}\relax
This function allows to make queries on an existing optimization option list.
This list must have been created and updated by the \code{optimset} function.
The \code{optimget} allows to retrieve the value associated with a given key.
\end{Description}
%
\begin{Usage}
\begin{verbatim}
  optimget(options = NULL, key = NULL, value = NULL)
\end{verbatim}
\end{Usage}
%
\begin{Arguments}
\begin{ldescription}
\item[\code{options}] A list created or modifies by \code{optimset}.
\item[\code{key}] A single character string, which should be the name of the field in
\code{options} to query (case insensitive).
\item[\code{value}] A default value.
\end{ldescription}
\end{Arguments}
%
\begin{Details}\relax
\code{key} is matched against the field names of \code{options} using
\code{grep} and a case-insensitive regular expression. If \code{key} is not
found in \code{options}, the function returns NULL. If several matches are
found, \code{optimget} is stopped.
\end{Details}
%
\begin{Value}
Return \code{options\$key} if \code{key} is found in \code{options}. Return
\code{value}, otherwise.
\end{Value}
%
\begin{Author}\relax
Author of Scilab neldermead module: Michael Baudin (INRIA - Digiteo)

Author of R adaptation: Sebastien Bihorel (\email{sb.pmlab@gmail.com})
\end{Author}
%
\begin{SeeAlso}\relax
\code{\LinkA{optimset}{optimset}}
\end{SeeAlso}
%
\begin{Examples}
\begin{ExampleCode}
  opt <- optimset(method='fminsearch')
  optimget(opt,'Display')
  optimget(opt,'abc','!@')
\end{ExampleCode}
\end{Examples}
