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

Function is_matrix

inst/include/Rcpp/api/meat/is.h:29–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28 inline bool is_atomic(SEXP x) { return Rf_length(x) == 1; }
29 inline bool is_matrix(SEXP x) {
30 SEXP dim = Rf_getAttrib( x, R_DimSymbol);
31 return dim != R_NilValue && Rf_length(dim) == 2;
32 }
33 template <> inline bool is__simple<int>(SEXP x) {
34 return is_atomic(x) && TYPEOF(x) == INTSXP;
35 }

Callers 7

is__simple<RawMatrix>Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected