Re: [R] Using optim() with a function which returns more than a scalar - alternatives?

2006-02-14 Thread Barry Rowlingson
Søren Højsgaard wrote: > I want to numerically maximize a function with optim (maximization > over several arguments). optim() needs a function which returns a > scalar only. However, it could be nice to be able to "take other > things out" from the function as well. I'tried to create an attribute

[R] Using optim() with a function which returns more than a scalar - alternatives?

2006-02-14 Thread Søren Højsgaard
I want to numerically maximize a function with optim (maximization over several arguments). optim() needs a function which returns a scalar only. However, it could be nice to be able to "take other things out" from the function as well. I'tried to create an attribute to the scalar with what I wa