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

Method set

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

Source from the content-addressed store, hash-verified

178 VECTOR& parent ;
179 std::string name;
180 void set( SEXP rhs ){
181 R_xlen_t index = 0 ;
182 try{
183 index = parent.offset(name) ;
184 parent[ index ] = rhs ; // #nocov
185 } catch( const index_out_of_bounds& ex ){
186 parent.push_back( rhs, name );
187 }
188 }
189 SEXP get() const {
190 return parent[ parent.offset(name) ];
191 }

Callers

nothing calls this directly

Calls 2

offsetMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected