[Rd] embedding R in c++ (Qt) application

Peter.Peyk at unibas.ch Peter.Peyk at unibas.ch
Wed Jun 18 14:13:14 CEST 2008


Hi R-Developers,

I'm working on running statistical analyses with embedded R from a  
Qt-GUI-application (C++).

I've been able to link with R libraries, but I'm having a hard time to  
understand the C-coding examples. I'm a C++, not a C programmer (never  
used malloc before), and many of the R-specific  
functions/keywords/macros (for instance (UN)PROTECT, SETCAR, all the  
data types (SEXP, CHARSXP etc..) ) don't mean anything to me. The  
section on the SEXP type in the R-internals doc didn't tell me much.  
How can I create such objects containing my data? how can I extract  
numbers or strings from SEXPs?
Can you suggest me a helpfile/documentation to read to get into  
understanding this? Is there an index of the R C-exports/keywords to  
look up these things?
I've been digging in the sources, but I thought there may be a better  
way....? I've been able to extract all the exported symbols from the  
R.dll, but without arguments types (and of course without descriptions  
...)

My goal is to prepare some data for R to run an ANOVA on, run it, and  
retrieve the results to display them on the GUI. Can you suggest me a  
helpfiles/documentations to read for this?

Thanks for any suggestions
Peter



More information about the R-devel mailing list