On 16 November 2012 at 23:28, Søren Højsgaard wrote:
| Dear list,
| 
| Sorry for a trivial question: I have created the function below which calls 
"match" on each vector in a list and returns the result as a list. The function 
does what I want it to, but I am puzzled by this:
| 
| + IntegerVector out = R_match(wrap(ee), V_);
| + Rcout << out << std::endl;
| 
| which prints
| 
| 0xca858e0
| 0xca85cd0
| 0xd715d80
| 0xd715db8

As Romain said, it is simply not there. You need to define an operator<< for
this which we don;t have --- an easy avenue for someone to contribute
something meaningful but not too complicated (hopefully...).

What I do is to use Armadillo's containers -- they have this and a few other
input / output facilities.
 
| - which proves that there is something not clear to me: Can't I print an 
entire vector with Rcout - or must I exctract each element and print separately 
(which seems kludgy)? 

a) Define a print function, or b) define operator<<, or c) cast to arma::vec
and print that or d) use the kludge of printing via a loop.

Dirk

-- 
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com  
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to