Displaying 1 result from an estimated 1 matches for "dblx".
Did you mean:
dbl
2009 May 26
1
passing "..." arguments to a function called by eval()
...;...".
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_fcall;
PROTECT(retVal = NEW_NUMERIC(1));
PROTECT(R_fcall = lang3(funFn, R_NilValue, R_NilValue));
SETCADR(R_fcall, dblX);
SETCADDR(R_fcall,...