Re: [Rd] Create and access several instances of a C++ class from R

2011-05-13 Thread soeren . vogel
On 07.05.2011, at 11:15, Romain Francois wrote: Try having do_bar with this signature: void do_bar(NumericVector data); And my advice would probably also to have your C field either as a NumericVector. NumericVector is just a thin wrapper around the internal R data structure. Having

Re: [Rd] Create and access several instances of a C++ class from R

2011-05-07 Thread soeren . vogel
Hello Thanks again for help! We have attached version info, code, and contents of 00install.out at the end of the message. The package can be found here: http://sovo.md-hh.com/files/Foo.tar.gz We had followed Dirks explanation in the Rcpp modules vignette and the presentation of Rcpp

Re: [Rd] Create and access several instances of a C++ class from R

2011-05-07 Thread Romain Francois
Hello, Try having do_bar with this signature: void do_bar(NumericVector data); And my advice would probably also to have your C field either as a NumericVector. NumericVector is just a thin wrapper around the internal R data structure. Having data members as direct pointers is dangerous

[Rd] Create and access several instances of a C++ class from R

2011-05-06 Thread soeren . vogel
Hello We have a C++ class with several methods that manipulate an object. How is it possible to create several instances of that class *from R* in the C++ realm, which can then be accessed via a given name character? Symbolic example (we hope this illustrates our problem): // C++ side: class

Re: [Rd] Create and access several instances of a C++ class from R

2011-05-06 Thread Dirk Eddelbuettel
Sören and Carlo, On 6 May 2011 at 19:24, soeren.vo...@uzh.ch wrote: | Hello | | We have a C++ class with several methods that manipulate an object. How is | it possible to create several instances of that class *from R* in the C++ | realm, which can then be accessed via a given name character?