[Rd] embedding R in c++ (Qt) application
Dirk Eddelbuettel
edd at debian.org
Fri Jun 20 05:32:38 CEST 2008
Peter,
On 19 June 2008 at 17:37, Peter.Peyk at unibas.ch wrote:
| Hi Dirk,
|
| I've had a closer look now at Rcpp and I've found a lot
| of constructors and functions that take SEXPs as input - so the way back from
| R to C++ seems clear to me.
|
| However, I don't know how to pass my data from c++ to R . I've managed
| to have the embedded R evaluate commands (construct vectors and do
| something with them) with the help of the official manual,
| but I couldn't assign for instance an RcppVector to an SEXP or any of
| these constructed vectors ...
I think you are halfway there. You have an embedded R session, you can assign
variables and evaluate commands. You also see RCpp and how to pass data
out. I think all I did at that point was to invert a few of those functions
to pass data in ... and there you have it in your embedded R session.
Hope this helps, Dirk
--
Three out of two people have difficulties with fractions.
More information about the R-devel
mailing list