RcppArmadillo sample on armadillo vector classes
We have been using the sample function from RcppArmadillo to randomly sample a NumericVector object. However, we have noticed that it isn't possible to use the same function on Armadillo types ( vec or uvec ). We have looked at the function definitions from the sample.h file and it looks like a templated function that should be able to work with these types, but we haven't been able to figure out how to make it work with Armadillo classes without doing a lot of conversions to and from the NumericVector or IntegerVector types from the Rcpp library. For example, we have this function written in