[Rcpp-devel] operator<< issues
edd at debian.org
Tue Mar 20 13:02:08 CET 2018
On 20 March 2018 at 11:42, Iñaki Úcar wrote:
| I may have my own reasons for that, but that's not the point here. The
| point is that I expected a homogeneous behaviour across Rcpp classes
| when any object is passed to operator<< (i.e., print *something*).
| By grepping the source, I discovered that Matrix and Vector have an
| implementation of operator<<, but not the other classes.
| Of course, this is a minor issue, because anyone is able to define
| this operator if needed. I simply wanted to note it here, just in case
| Dirk considered that all classes should have a well-defined one.
Yes, there are always some missing elements and holes. Contributions welcome.
The operator<<() addition for matrices and vectors came as those types are
most often used. "General purpose" operators are a lot work, particularly for
data.frame, see eg all the work dplyr, tibble, pillar, ... are going through.
We do have a print() method though that dispatches to R's print function.
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel