[Rd] Scatter plot calling R function from C

Prof Brian Ripley ripley@stats.ox.ac.uk
Sun, 11 Feb 2001 16:49:28 +0000 (GMT)


On Sun, 11 Feb 2001, Tsumiyama Isao wrote:

>  Dear R users,
>
>   I want to create a C program drawing a scatter plot
>   with R functions.
>
> Is it possible to do such a thing with interfaces declared
> in 'Rgraphics.h'? If so, I would like to get sample C sources.

Strictly no.  You would need to open an R graphics device, and you can't
do that from the publically declared headers.  And you would need to
handle all the error conditions that call back into R.

>From C code called from R you can write to an already opened graphics
device.  Alternatives, you can embed R in your C program and then call R
graphics via R calls.

I don't think there are many examples: Rgraphics.h was included for
use by experts writing addons.  Paul Murrell may be able to help more.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._