Hi All, I was reading the R extension manual section 5.11 ( Evaluating R expression from C) and I tried to build a simple call to the sum function. Please see below.
call_to_sum <- inline::cfunction( language = "C", sig = c(x = "SEXP"), body = " SEXP e = PROTECT(lang2(install(\"sum\"), x)); SEXP ans = PROTECT(eval(e, R_GlobalEnv)); UNPROTECT(2); return ans; ") call_to_sum(1:3) The above works. My question is how do I add the argument "na.rm=TRUE" at C level to the above call? I have tried various things based on what is in section 5.11 but I did not manage to get it to work. Thank you Best regards [[alternative HTML version deleted]] ______________________________________________ Remail@example.com mailing list https://stat.ethz.ch/mailman/listinfo/r-devel