Another novice question: the function

// [[Rcpp::export]]
IntegerVector maketable(IntegerVector x) {
  IntegerVector tab=table(x);
  return tab;
}

returns a named vector, and is about twice as fast as the R function 'table'. 
Is there a way to extract the names of the vector as a CharacterVector (or even 
better here, as an IntegerVector)?

BR David


_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to