t: 25. marts 2014 10:45
To: '[email protected]'
Subject: [Rcpp-devel] Getting names
Another novice question: the function
// [[Rcpp::export]]
IntegerVector maketable(IntegerVector x) {
IntegerVector tab=table(x);
return tab;
}
returns a named vector, and is
ehalf Of David
Edwards
Sent: 25. marts 2014 10:45
To: '[email protected]'
Subject: [Rcpp-devel] Getting names
Another novice question: the function
// [[Rcpp::export]]
IntegerVector maketable(IntegerVector x) {
IntegerVector tab=table(x);
return tab;
}
returns a
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