[R] interfacing R and c++

Martin Maechler maechler at stat.math.ethz.ch
Wed Jul 3 10:40:13 CEST 2002


>>>>> "NancyW" == Wong, Nancy Diana <nancy_wong at merck.com> writes:

    NancyW> I'm trying to write a gui program that accesses some
    NancyW> R code I've written.

That gui might potentially be interesting to quite a few people! 

    NancyW> The gui is written in c++ and
    NancyW> includes qt libraries and vigra libraries (for image
    NancyW> manipulation).  Unfortunately I've been getting
    NancyW> dependencies due to constants getting redefined
    NancyW> within the R.h/R_ext library and Rinternals.h.

here you should become more specific:
Can you give your "#include" statements and the compiler (or
linker?) error messages?
Could it be that you include both Rdefines.h and Rinternals.h ?
You should rather only use one of these; 
read the information on the topic in the "Writing R Extensions"
Manual, in the "System and foreign language interfaces" part.

    NancyW> I tried rewriting the R interface but the problem
    NancyW> keeps propagating.  I've been told Gnumeric is a
    NancyW> better gui library for working with R however,
    NancyW> before I rewrite my entire program, is there an
    NancyW> obvious solution to calling R functions in C++/qt?

I think using R as plugin for GNumeric might be more widely
useful (for the R community); but I guess this could be something
quite a bit different from what you have in mind currently.  I'm
not the expert here at all, though.

Regards,
Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list