I'm trying to pass a vector to the R function called from within Rcpp:
Rcpp::Function aperm("aperm");
int perm[3] = {2,1,3};
arr = aperm(arr, Rcpp::Named("perm", perm));
I've tried to wrap the perm before calling aperm but in both cases I am getting various Rcpp errors:
arr = aperm(arr, Rcpp::Named("perm", Rcpp::wrap(perm)));
Is it possible to pass a vector as a parameter to an R function when calling it from Rcpp?