Re: [Rcpp-devel] Vectorized version of rbinom function via Rcpp

2012-10-25 Thread Douglas Bates
On Thu, Oct 25, 2012 at 9:29 AM, Dirk Eddelbuettel wrote: > > Hi Carsten, > > On 25 October 2012 at 16:05, carsten Gerken wrote: > | Hi All, > | > | I am trying to outsource the simulation of binomially distributed random > | variables to C++ via Rcpp (e.g. to replicate the R command > rbinom(10,

Re: [Rcpp-devel] Vectorized version of rbinom function via Rcpp

2012-10-25 Thread Dirk Eddelbuettel
Hi Carsten, On 25 October 2012 at 16:05, carsten Gerken wrote: | Hi All, | | I am trying to outsource the simulation of binomially distributed random | variables to C++ via Rcpp (e.g. to replicate the R command rbinom(10,10,c(1:10) | /20)). This works well as long as the third argument of the

[Rcpp-devel] Vectorized version of rbinom function via Rcpp

2012-10-25 Thread carsten Gerken
Hi All, I am trying to outsource the simulation of binomially distributed random variables to C++ via Rcpp (e.g. to replicate the R command rbinom(10,10,c(1:10)/20)). This works well as long as the third argument of the function (i.e. the probability) is a single value and not a vector. I tried