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

Method set

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

Source from the content-addressed store, hash-verified

118 VECTOR& parent ;
119 std::string name;
120 void set( const std::string& rhs ){
121 R_xlen_t index = 0 ;
122 try{
123 index = parent.offset(name) ;
124 parent[ index ] = rhs ;
125 } catch( const index_out_of_bounds& ex ){
126 parent.push_back( rhs, name );
127 }
128 }
129 char* get() const {
130 return parent[ parent.offset(name) ];
131 }

Callers

nothing calls this directly

Calls 2

offsetMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected