As Dirk pointed out to me off-list, I shouldn't reply to email before
coffee. It was my mistake - you had indeed used RNGscope properly.
On Wed, Apr 13, 2011 at 8:27 AM, Cedric Ginestet
wrote:
> Thanks Douglas for being picky!
> I have indeed noted that I needed to use b+1 in my codes to produce
Thanks Douglas for being picky!
I have indeed noted that I needed to use b+1 in my codes to produce
discrete uniform variates. However, I am not too sure that I understand
how to use RNGScope properly. I originally referred to the Rcpp Sugar
codes provided in the Rcpp-introduction .pdf document
On Wed, Apr 13, 2011 at 6:50 AM, Cedric Ginestet
wrote:
> Brilliant, Dirk. Thanks for that.
> Next time, I'll read the Rcpp Sugar .pdf more carefully.
> Cheers,
Be aware that in both versions you will never return a vector
containing b, which might be confusing. That is, the argument b
should be
Brilliant, Dirk. Thanks for that.
Next time, I'll read the Rcpp Sugar .pdf more carefully.
Cheers,
On 13/04/11 12:43, Dirk Eddelbuettel wrote:
On 13 April 2011 at 12:19, Cedric Ginestet wrote:
| Hi guys,
|
| I want to produce discrete uniform variates within C++ from the runif()
| function avai
On 13 April 2011 at 12:19, Cedric Ginestet wrote:
| Hi guys,
|
| I want to produce discrete uniform variates within C++ from the runif()
| function available through Rcpp Sugar. However, I don't seem to be able to
find
| the appropriate cast in order to return an IntegerVector as opposed to a
|
Hi guys,
I want to produce discrete uniform variates within C++ from the runif()
function available through Rcpp Sugar. However, I don't seem to be able
to find the appropriate cast in order to return an IntegerVector as
opposed to a numeric one. I have naively used int(), but this is clearly