optimbase.checkcostfun
to check whether the
dimensions of a cost function output match the expectations.
optimbase.checkshape(this = NULL, varname = NULL, data = NULL, index = NULL, expectednrows = NULL, expectedncols = NULL)
vignette('optimbase',package='optimbase')
for more details).optimbase.checkcostfun