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.
optimget(options = NULL, key = NULL, value = NULL)
A list created or modifies by optimset
.
A single character string, which should be the name of the field in
options
to query (case insensitive).
A default value.
Return options$key
if key
is found in options
. Return
value
, otherwise.
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.
# NOT RUN {
opt <- optimset(method='fminsearch')
optimget(opt,'Display')
optimget(opt,'abc','!@')
# }
Run the code above in your browser using DataLab