Consider this Rcpp Armadillo function:
// [[Rcpp::depends(RcppArmadillo)]] #include using namespace arma; // [[Rcpp::export]] vec tes