Displaying 1 result from an estimated 1 matches for "dtestc".
Did you mean:
dtest
2009 May 26
1
passing "..." arguments to a function called by eval()
...valuate the value
in the C code using eval, and then return it. I also want to allow an
arbitrary number of arguments to the function using "...".
The code for my toy package looks like this:
########## R code, in pkg/R directory
dTest <-
function(x,...){
retVal = .Call("dTestC",x[1],dnorm,...,rho=new.env(),PACKAGE="pkg")
return(retVal)
}
########## C code, in pkg/src directory
SEXP dTestC(SEXP dblX, SEXP funFn, SEXP dots, SEXP rho);
/*--------------------------*/
SEXP dTestC(SEXP dblX, SEXP funFn, SEXP dots, SEXP rho){
SEXP retVal;
SEXP R_fca...