[[Rcpp::export]]
| 170 | |
| 171 | // [[Rcpp::export]] |
| 172 | Pairlist runit_pl_insert(){ |
| 173 | Pairlist p ; |
| 174 | p.push_back( 1 ) ; |
| 175 | p.push_back( 10.0 ) ; |
| 176 | p.push_back( 20.0 ) ; |
| 177 | |
| 178 | /* insert in 2nd position */ |
| 179 | p.insert( 1, Named( "bla", "bla" ) ) ; |
| 180 | |
| 181 | /* insert in front */ |
| 182 | p.insert( 0, 30.0 ) ; |
| 183 | |
| 184 | /* insert in back */ |
| 185 | p.insert( 5, "foobar" ) ; |
| 186 | |
| 187 | return p ; |
| 188 | } |
| 189 | |
| 190 | // [[Rcpp::export]] |
| 191 | Pairlist runit_pl_replace(){ |