Skip to content
Prev 34893 / 63421 Next

Segmentation faults on SEXP conversion

On 15/11/2009 8:25 PM, nabble.30.miller_2555 at spamgourmet.com wrote:
Sorry, I missed something else that's obvious:  .Call needs a return 
value.  The c function needs to include Rinternals.h, and the function 
needs to return a SEXP.  So this works:

#include <Rinternals.h>
SEXP Rwrite() { Rprintf("[%i] %s",12,"Hi");  return R_NilValue; }

(and your ptest function will return NULL).

Duncan Murdoch