Re: [Rcpp-devel] rgamma() behavior

2014-03-24 Thread Kevin Ushey
Hi Gregor, Dirk, Added here: https://github.com/RcppCore/Rcpp/commit/f6e7e34b94ba52c1341142a5640d0ede674073c7 Please feel free to tweak for wording / style / clarity :) Kevin On Mon, Mar 24, 2014 at 5:05 PM, Dirk Eddelbuettel wrote: > > On 24 March 2014 at 16:45, Kevin Ushey wrote: > | Hi Gre

Re: [Rcpp-devel] rgamma() behavior

2014-03-24 Thread Dirk Eddelbuettel
On 24 March 2014 at 16:45, Kevin Ushey wrote: | Hi Gregor, | | This is probably worth a reminder as you say. Just for reference, the | motivation is that R's internal computations for rexp and rgamma | default to the 'scale' parameterization, rather than the 'rate' | parameterization seen at the

Re: [Rcpp-devel] rgamma() behavior

2014-03-24 Thread Kevin Ushey
Hi Gregor, This is probably worth a reminder as you say. Just for reference, the motivation is that R's internal computations for rexp and rgamma default to the 'scale' parameterization, rather than the 'rate' parameterization seen at the R level. Rcpp uses that internal operation and hence isn't

[Rcpp-devel] rgamma() behavior

2014-03-24 Thread Gregor Kastner
Dear all, I believe it's the second time I just realized that Rcpp::rgamma() behaves differently than to R's rgamma() when called without named arguments: ** BEGIN code.R ** library(Rcpp) cppFunction(' SEXP rgamma2(const int n, const double a, const double b) { RNGSc