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

Method Head

inst/include/Rcpp/sugar/functions/head.h:34–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
33
34 Head( const VEC_TYPE& object_, R_xlen_t n_ ) : object(object_), n(n_) {
35 if( n < 0 ){
36 n = object.size() + n ;
37 }
38 }
39
40 inline STORAGE operator[]( R_xlen_t i ) const {
41 return object[ i ] ;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected