Skip to content
Prev 12229 / 398502 Next

C code and R

On Mon, 9 Jul 2001, Agustin Lobo wrote:

            
Not specifically on R. You may find the book "S Programming" by Venables &
Ripley useful.
Not really, if .C is being used to call it. It is a good idea to use R's
facilities if you want to print to the screen from C code, and it may well
help to use R's memory management (eg Calloc or R_alloc) rather than
managing memory yourself, but these are optional.

While you need to learn more initially it is often more effective to use
the .Call() interface unless you need portability between S and R (and
sometimes even then).
Section 4.4 of "Writing R Extensions" describes how you do this.

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._