MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / unique

Function unique

inst/include/Rcpp/sugar/functions/unique.h:65–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64template <int RTYPE, bool NA, typename T>
65inline Vector<RTYPE> unique( const VectorBase<RTYPE,NA,T>& t ){
66 Vector<RTYPE> vec(t) ;
67 sugar::IndexHash<RTYPE> hash(vec) ;
68 hash.fill() ;
69 return hash.keys() ;
70}
71template <int RTYPE, bool NA, typename T>
72inline Vector<RTYPE> sort_unique( const VectorBase<RTYPE,NA,T>& t , bool decreasing = false){
73 return unique<RTYPE,NA,T>( t ).sort(decreasing) ;

Callers 3

runit_unique_intFunction · 0.85
runit_unique_dblFunction · 0.85
runit_unique_chFunction · 0.85

Calls 2

fillMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected