Skip to content

Commit f3125b5

Browse files
committed
Allow conversions from Rcpp vectors to RObject
1 parent 0f7231e commit f3125b5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-02-03 Kevin Ushey <[email protected]>
2+
3+
* inst/include/Rcpp/vector/Vector.h: Enable conversion from
4+
Rcpp vectors to RObject
5+
16
2014-02-02 Dirk Eddelbuettel <[email protected]>
27

38
* DESCRIPTION: Release 0.11.0

inst/include/Rcpp/vector/Vector.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ class Vector :
237237
inline NameProxy operator()( const std::string& name ) const {
238238
return NameProxy( const_cast<Vector&>(*this), name ) ;
239239
}
240+
241+
inline operator RObject() const {
242+
return RObject( Storage::get__() );
243+
}
240244

241245
Vector& sort(){
242246
typename traits::storage_type<RTYPE>::type* start = internal::r_vector_start<RTYPE>( Storage::get__() ) ;

0 commit comments

Comments
 (0)