Displaying 1 result from an estimated 1 matches for "r_source_arg".
2004 Aug 18
3
R as shared library
...ptr_R_WriteConsole = Rapache_WriteConsole;
/* load source(). I assume this is appropriate. I could
always move this to the code that handles the requst */
PROTECT(R_source_fun = allocVector(LANGSXP, 2));
SETCAR(R_source_fun, Rf_install("source"));
SETCAR(CDR(R_source_fun), R_source_arg = NEW_CHARACTER(1));
Then each request is serviced by the following code:
/* r is apache request, r->filename is url translated to
apsolute path to filename */
SET_STRING_ELT(R_source_arg, 0, COPY_TO_USER_STRING(r->filename));
errorOccurred=1;
/* R code: source(filename) */
v...