Skip to content
Prev 325480 / 398503 Next

Optimization of a function using optim

Dear Graham,
On 16 June 2013 02:08, Graham McDannel <graham.mcdannel at gmail.com> wrote:
I suspect a function requires an argument named n, and you
didn't pass one.  Either in your objective function or in optim.
See blow example that produce a similar error:
+    if(n <1) {
+     print("one")
+    }
+ }
Error in n < 1 : 'n' is missing


Best Wishes,
-m