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

Method set

inst/include/Rcpp/vector/proxy.h:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 VECTOR& parent ;
67 std::string name;
68 void set( CTYPE rhs ){
69 R_xlen_t index = 0 ;
70 try{
71 index = parent.offset(name) ;
72 parent[ index ] = rhs ;
73 } catch( const index_out_of_bounds& ex ){
74 parent.push_back( rhs, name );
75 }
76 }
77 CTYPE get() const {
78 return parent[ parent.offset(name) ];
79 }

Callers

nothing calls this directly

Calls 2

offsetMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected