[Rd] Using R graphics from external C functions
alienalias at gmail.com
Sat Dec 13 02:24:45 CET 2008
I haven't been working with R before, but has been asked by my
colleagues to investigate the possibility of using R plotting
capabilities from external (C) code. They have several plotting
functions, implemented in R, that are needed to be included in a
front-end Windows-based application. As far as I understood, R.dll is
a dll that serves external R calls.
1) My first question is if I need a complete R installation on a user
machine to be able to perform such calls? If R.dll only passes the
calls to R interpreter then the answer is, probably, "yes"..
2) If the answer on the first question is "yes". For us it is not an
option to have R installed on a user's side. How difficult, if
possible at all, would it be then to extract and compile all C code
related to R graphics into a stand-alone library to link our user
application to? So that in my own C code I call C-equivalents of R
internal graphical functions, such as "do_rect" or "do_plot_xy". I
assume that would include at least compiling the C code of standard
packages "grDevices" and "graphics", but perhaps, it is much more than
just that? I am afraid these packages would depend on the other core
packages of R. Plus some other obstacles I cannot foresee.
I cannot myself estimate such an undertaking because of the lack of
acquittance with R. I would really appreciate your opinion and
reasoning. If this way is not relatively easy or doable, I will
convince my colleagues to write an alternative plotting functions
using other means.
Thanks you all very much,
More information about the R-devel