On 16.03.2012 18:08, Erin Hodgess wrote:
Dear R People:

I'm not sure if I should ask this here or in Rcpp,

Why is this related to Rcpp?

but I thought I'd
start here first.

If I'm writing a C program, when do I know to use SEXP vs. int or float, please?

For very short:

If you want keep some things internal to your C code, use int etc. , but if it makes sense to use R objects (e.g. because you return things or make use of otehr R functionality), use SEXP objects. If the latter, you already decided to use the .Call() interface.

There is more in Writing R Extensions.

Uwe


Thanks,
Erin



______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to