The various header file, and the Rcpp sugar vignette, provide full
documentation for Rcpp sugar.
The C++ source file corresponding to the this function does the
following:
int n; // length passed in from RNumericVector rn = rnorm(n);
NumericVector rt = rt(n, 1.0);
NumericVector rp = rpois(n, 1.0);
// create a new data frame to return drawns
return DataFrame::create(Named("rnorm") = xn,
Named("rt") = xt,
Named("rpois") = xp);
As shown in the example section, provided the seed is reset, the exact
same draws can be obtained in R itself -- which is important for reproducibility.