[Rcpp-devel] times, dates, etc .... in the new apis
francoisromain at free.fr
Tue Jan 26 20:25:37 CET 2010
What about something like :
class Rcpp::Date similar to RcppDate.
wrap<Date>(const Date& date)
wrap<vector<Date>>(const vector<Date>& date)
and maybe perhaps also:
wrap<time_t>( const time_t& t)
wrap<vector<time_t>>( const vector<time_t>& t)
We probably not need additional Rcpp:: classes (apart maybe from Date)
here, so that all the wrap versions above could return a NumericVector
but setting the attributes differently.
... actually now that I think of it, for Date we should just have to
- operator SEXP()
in order to get as and wrap for free (could be a good example for what
the NEWS pretends.
Professional R Enthusiast
+33(0) 6 28 91 30 30
|- http://tr.im/KfKn : Rcpp 0.7.2
|- http://tr.im/JOlc : External pointers with Rcpp
`- http://tr.im/JFqa : R Journal, Volume 1/2, December 2009
More information about the Rcpp-devel