Re: [Rcpp-devel] Ref classes: can I register fields as I register methods?

2010-11-21 Thread Romain Francois
Hello, Why would you also post here when you posted on R-devel minutes ago. This is not Rcpp specific. Romain Le 21/11/10 23:53, Janko Thyson a écrit : Hi there, is it possible to register fields as you can register methods with getRefClass("Classname")$methods(.)? I know that you should u

[Rcpp-devel] Ref classes: can I register fields as I register methods?

2010-11-21 Thread Janko Thyson
Hi there, is it possible to register fields as you can register methods with getRefClass("Classname")$methods(.)? I know that you should usually give some thought on which fields you need and hardcode them in the class def. But I'm playing around with dynamically creating/extending sort of a temp

Re: [Rcpp-devel] potential new way to expose constructors

2010-11-21 Thread Romain Francois
Le 21/11/10 21:59, Douglas Bates a écrit : That's fine with me. Done. I've also updated wls and RcppModules accordingly. Sorry for the slow response. I'm down with a cold or the flu today. You replied in less than two hours. It does not really qualify as slow ... Good luck with the cold.

Re: [Rcpp-devel] potential new way to expose constructors

2010-11-21 Thread Douglas Bates
That's fine with me. Sorry for the slow response. I'm down with a cold or the flu today. On Sun, Nov 21, 2010 at 1:52 PM, Romain Francois wrote: > Le 21/11/10 20:42, Andrew Redd a écrit : >> >> The init_2 is unnatural.  I would prefer the new syntax.  As I have to >> code that is relying in the

Re: [Rcpp-devel] potential new way to expose constructors

2010-11-21 Thread Romain Francois
Le 21/11/10 20:42, Andrew Redd a écrit : The init_2 is unnatural. I would prefer the new syntax. As I have to code that is relying in the init_2 at the moment I'm fine with switching it out. Great. I'll wait for Doug's go and switch them. Does this mean that we will be able to expose multip

Re: [Rcpp-devel] potential new way to expose constructors

2010-11-21 Thread Andrew Redd
The init_2 is unnatural. I would prefer the new syntax. As I have to code that is relying in the init_2 at the moment I'm fine with switching it out. Does this mean that we will be able to expose multiple constructors? -Andrew On Sun, Nov 21, 2010 at 12:00 PM, Romain Francois wrote: > Hello, >

[Rcpp-devel] potential new way to expose constructors

2010-11-21 Thread Romain Francois
Hello, I've just commited some code that will potentially make it simpler to expose constructors. Where previously we would do something like .constructor( init_2() ) we can now do: .ctor() We probably don't want to keep both, so I'd like to keep the second solution but to call it constru

Re: [Rcpp-devel] Rcpp::wrap segmentation fault

2010-11-21 Thread Dirk Eddelbuettel
Hola Marc, On 21 November 2010 at 15:45, marc michalewicz wrote: | Thanks Dirk | | for this fast and useful reply. I tested your example and it works for me too, fine. But I am afraid I completely misunderstood the things - thx for being so kind to call it "almost understand": | | Looking at

Re: [Rcpp-devel] Rcpp::wrap segmentation fault

2010-11-21 Thread marc michalewicz
Thanks Dirk for this fast and useful reply. I tested your example and it works for me too, fine. But I am afraid I completely misunderstood the things - thx for being so kind to call it "almost understand": Looking at things from the application architecture point of view: I have an existing

Re: [Rcpp-devel] Rcpp::wrap segmentation fault

2010-11-21 Thread Dirk Eddelbuettel
Marc, On 21 November 2010 at 06:57, Dirk Eddelbuettel wrote: | Basically, R itself is the main(). You never see that code. You simply write | functions all confirming to Typo: "conforming" is what I meant. | SEXP myfunction(SEXP a, SEXP b, ...) | | which take one or more SEXP objects and re

Re: [Rcpp-devel] Rcpp::wrap segmentation fault

2010-11-21 Thread Dirk Eddelbuettel
On 21 November 2010 at 13:46, marc michalewicz wrote: | Hi, | | I use R 2.12.0 on Fedora FC13 and experience a segmentatioin fault when using a standard example from the artice "Rcpp: Seamless R and C++ integration" by D. Eddelbuettel: | | When trying out this quite small and simple example: |

[Rcpp-devel] Rcpp::wrap segmentation fault

2010-11-21 Thread marc michalewicz
Hi, I use R 2.12.0 on Fedora FC13 and experience a segmentatioin fault when using a standard example from the artice "Rcpp: Seamless R and C++ integration" by D. Eddelbuettel: When trying out this quite small and simple example: #include int main () { SEXP x; std::vector > v; std::map