Re: [Rcpp-devel] Getting names

2014-03-25 Thread David Edwards
Super, thanks for this Regards David From: Søren Højsgaard [mailto:[email protected]] Sent: 25. marts 2014 11:03 To: David Edwards; '[email protected]' Subject: RE: Getting names Something like this? x <- c(a=1, b=2) f <- cppFunction("CharacterVecto

[Rcpp-devel] Getting names

2014-03-25 Thread David Edwards
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

[Rcpp-devel] question from a novice

2014-03-18 Thread David Edwards
serveStorage, 10, true, Rcpp::sugar::Comparator_With_One_Value<13, Rcpp::sugar::greater<13>, true, Rcpp::Vector<13, Rcpp::PreserveStorage> > >' to 'SEXP' in initialization make: *** [temp.o] Error 1 What am I doing wrong? Best regards David Edwards sessi