21#ifndef Rcpp__sugar__table_h
22#define Rcpp__sugar__table_h
27template <
typename HASH,
typename STORAGE>
40template <
typename HASH,
int RTYPE>
48 names[
index++] = internal::r_coerce<RTYPE,STRSXP>(pair.first) ;
57template <
int RTYPE,
typename TABLE_T>
72 R_xlen_t n =
map.size() ;
81 typedef std::unordered_map<STORAGE, int>
HASH ;
85 typedef std::map<STORAGE, int, internal::NAComparator<STORAGE> >
SORTED_MAP ;
92template <
int RTYPE,
bool NA,
typename T>
void operator()(STORAGE value)
CountInserter(HASH &hash_)
Grabber(IntegerVector &res_, CharacterVector &names_)
std::map< STORAGE, int, internal::NAComparator< STORAGE > > SORTED_MAP
Table(const TABLE_T &table)
std::unordered_map< STORAGE, int > HASH
Rcpp::traits::storage_type< RTYPE >::type STORAGE
CountInserter< HASH, STORAGE > Inserter
no_init_vector no_init(R_xlen_t size)
Vector< STRSXP > CharacterVector
Vector< INTSXP > IntegerVector
IntegerVector table(const VectorBase< RTYPE, NA, T > &x)