[R] call_R

Adrian Trapletti Adrian.Trapletti at wu-wien.ac.at
Thu Jul 29 16:43:48 CEST 1999

I would like to use the call_R mechanism. Unfortunately I don't fully
understand what the arguments are from the example in

Could anybody explain me how I have to define the arguments, e.g., I
want to call R with 5 doubles (or double[5]) and func does not return a
value (is that possible or is it necessary to return at least a dummy?).

This is from the example and func takes one double and returns one:

void *args[1];
char *mode[1], *values[1];
long length[1];
double zz[1], *result;

mode[0] = "double"; length[0] = 1;
args[0] = (void*)(zz); zz[0] = z;

call_S(func, 1L, args, mode, length, 0L, 1L, values);

Thanks for the help


Adrian Trapletti, Vienna University of Economics and Business
Administration, Augasse 2-6, A-1090 Vienna, Austria
Phone: ++43 1 31336 4561, Fax: ++43 1 31336 708,
Email: adrian.trapletti at wu-wien.ac.at

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list