search for: elmt1

Displaying 1 result from an estimated 1 matches for "elmt1".

Did you mean: ecmt1
2008 Apr 24
1
Calling R functions with multiple arguments from C
...pied the C and R code below. It is code submitted by Timur Elzhov on the the R mailing list under the discussion Calling R function from within C code that I've modified. I've read that discussion, but still got stuck. Could anybody point me in the right direction? SEXP foo(SEXP fn, SEXP elmt1, SEXP elmt2, SEXP rho) { SEXP R_fcall, args, ans,s; PROTECT( args = s = allocList(2)); PROTECT( R_fcall = lang2(fn, R_NilValue) ); SETCAR(s,elmt1); SET_TAG(s,install("x")); s = CDR(s); SETCAR(s,elmt2); SET_TAG(s,install("y")); SETCADR( R_...