search for: nmmindemo

Displaying 2 results from an estimated 2 matches for "nmmindemo".

2006 Apr 13
1
bus error on calling nmmin
...s any replies. Is there some documentation on how to call nmmin apart the optim help page and the page in the R extensions manual giving the declaration? What do I need to change in the below to get it to work? (I also get a bus error with trace set to 0.) The source code and an example session: nmminDemo.c: #include <R_ext/Applic.h> #include <stdio.h> double parabola(int n, double *par, void *ex) { double xm = par[0] - 1; return xm * xm + 13; } int main() { double initial[1] = {1.5}; double result[1]; double value; int convergenceCode; const double abstol = 1e-16; cons...
2007 Oct 13
1
R API - optim
...c.h> #include <R.h> #include <stdio.h> double parabola(int n, double *par, void *ex) { double xm = par[0] - 1; return xm * xm + 13; } /* * Copied from tests/Embedded/embeddedRCall.c: */ extern int Rf_initEmbeddedR(int argc, char *argv[]); int main() { char *argv[]= {"nmminDemo", "--gui=none", "--silent"}; const int argc = 3; double initial[1] = {1.5}; double result[1]; double value; int convergenceCode; /* * The following values are based on the help * page for optim. */ const double abstol = 1e-16; const double relto...