* Does this vector have an element with the target name */
| 581 | * Does this vector have an element with the target name |
| 582 | */ |
| 583 | bool containsElementNamed( const char* target ) const { |
| 584 | SEXP names = RCPP_GET_NAMES(Storage::get__()) ; |
| 585 | if( Rf_isNull(names) ) return false ; |
| 586 | R_xlen_t n = Rf_xlength(names) ; |
| 587 | for( R_xlen_t i=0; i<n; i++){ |
| 588 | if( !strcmp( target, CHAR(STRING_ELT(names, i)) ) ) |
| 589 | return true ; |
| 590 | } |
| 591 | return false ; |
| 592 | } |
| 593 | |
| 594 | R_xlen_t findName(const std::string& name) const { |
| 595 | SEXP names = RCPP_GET_NAMES(Storage::get__()); |
no outgoing calls
no test coverage detected