Ok, I'll do exactly this and I'll report if I still encounter this
problem in simpler programs. Thanks.
On Mon, May 6, 2013 at 7:39 PM, Dirk Eddelbuettel wrote:
>
> On 6 May 2013 at 19:03, Matteo Fasiolo wrote:
> | Sorry for the silly question, but since I'm using sourceCpp() too I
> should't
>
On 6 May 2013 at 19:03, Matteo Fasiolo wrote:
| Sorry for the silly question, but since I'm using sourceCpp() too I should't
| callĀ
| getRNGstate/putRNGstate, right?
If you use any of the random number generators provided by R via Rcpp, then
you __MUST__ also instantiate an RNGScope() object (wh
Thanks for the quick replies! I'm using log() and then exp() on the
parameters because
this function goes within an optimization routine, so I need it keep the
parameters positive.
Sorry for the silly question, but since I'm using sourceCpp() too I
should't call
getRNGstate/putRNGstate, right?
I
On 6 May 2013 at 08:34, Douglas Bates wrote:
| The segfaults seem to be related to PutRNGstate and I don't see that you have
| declared an instance of the class that causes the RNGstate to be accessed and
| restored (I have forgotten the name of the class but it should be fairly easy
| to find in
Matteo,
This may reveal a subtle bug somewhere in the handling of temporary
expressions, with possible interactions with the garbage collection by R
itself.
That said, a trivial rewrite (below) which via a single sourceCpp() compiles
and runs, or re-runs it, has not lead to a single segfault he
The segfaults seem to be related to PutRNGstate and I don't see that you
have declared an instance of the class that causes the RNGstate to be
accessed and restored (I have forgotten the name of the class but it should
be fairly easy to find in the examples). When you use random number
generators
Hi All,
I am trying to simulate from the following model:
Y_t = Pois( phi * N_t );
N_t = r * N_{t-1} * exp( -N_{t-1}^theta + e_t )
e_t ~ Norm(0, sigma)
so I have written a Rcpp function with prototype:
genRickerCpp(int days, int nSimul, int nBurn, NumericMatrix params)
where:
days = length o