Try PrintValue(R_fcall):
function(x,y)match.call()
(list(x = 10, y = 12))
You want a pairlist of length 1+nargs, not a pairlist of pairlists. Here
is one way to do it (there are many)
#include
SEXP foo(SEXP fn, SEXP elmt1, SEXP elmt2, SEXP rho)
{
SEXP R_fcall, args, ans,s;
PROTECT(
Hi,
I'm writing a C function that has to call a R function with multiple
arguments. I've read the relevant section in Writing R Extensions, and
searched the R site, mailing lists as well as rseek. I managed to call
the function, but I'm now having trouble creating the argument list.
I tried to cr