dirkschumacher / armacmp

🚀 Automatically compile linear algebra R code to C++ with Armadillo

Home Page:https://dirkschumacher.github.io/armacmp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single value vs. vector sampling

coatless opened this issue · comments

There are two sets of underlying samplers in Rcpp.

Samplers returning a NumericVector are from Rcpp:: and those that return a double are from R::.

E.g.

rnorm(1, 2, 3) => R::rnorm(2.0, 3.0)
rnorm(50, 2, 3) => Rcpp::rnorm(50, 2.0, 3.0)

I think I would go with the Rcpp one for now - the least amount of work.