search for: my_r_writeconsole

Displaying 1 result from an estimated 1 matches for "my_r_writeconsole".

2007 Apr 03
2
R callbacks
...ace.h. As a first attempt, I'm trying to redefine ptr_R_WriteConsole in a very trivial manner. Here's my code: --------------- $ cat altr.c int Rf_initialize_R(int ac, char **av); #define R_INTERFACE_PTRS 1 #include <Rinterface.h> extern int R_running_as_main_program; static void my_R_WriteConsole(char *buf, int len) { printf("R<< %s", buf); } int main(int ac, char **av) { R_running_as_main_program = 1; ptr_R_WriteConsole = my_R_WriteConsole; Rf_initialize_R(ac, av); Rf_mainloop(); return 0; } --------------- I compile and run this in bash with RPR...