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

Method Tail

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected