Skip to content

Commit 041a4c0

Browse files
committed
Add a note on the Rcpp-sugar vignette re: different parameterizations
1 parent bf4dc39 commit 041a4c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vignettes/Rcpp-sugar.Rnw

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,13 @@ Similar d/q/p/r functions are provided for the most common distributions:
468468
beta, binom, cauchy, chisq, exp, f, gamma, geom, hyper, lnorm, logis, nbeta,
469469
nbinom, nbinom\_mu, nchisq, nf, norm, nt, pois, t, unif, and weibull.
470470

471+
Note that the parameterization used in these sugar functions may differ between
472+
the top-level functions exposed in an \proglang{R} session. For example,
473+
the internal \code{rexp} is parameterized by \code{scale},
474+
whereas the R-level \code{stats::rexp} is parameterized by \code{rate}.
475+
Consult \href{http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Distribution-functions}{Distribution Functions}
476+
for more details on the parameterization used for these sugar functions.
477+
471478
One point to note is that the programmer using these functions needs to
472479
initialize the state of the random number generator as detailed in Section
473480
6.3 of the `Writing R Extensions' manual \citep{R:Extensions}. A nice

0 commit comments

Comments
 (0)