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

Function RcppTable

inst/tinytest/cpp/table.cpp:26–37  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

24
25// [[Rcpp::export]]
26IntegerVector RcppTable(SEXP x) {
27 switch (TYPEOF(x)) {
28 case INTSXP: return table(as<IntegerVector>(x));
29 case REALSXP: return table(as<NumericVector>(x));
30 case STRSXP: return table(as<CharacterVector>(x));
31 case LGLSXP: return table(as<LogicalVector>(x));
32 default: {
33 stop("untested SEXP type");
34 return R_NilValue;
35 }
36 }
37}

Callers

nothing calls this directly

Calls 2

tableFunction · 0.85
stopFunction · 0.85

Tested by

no test coverage detected