<div dir="ltr">Can you give more information on why we need this or what problem people are facing now?<div><br></div><div>Best,</div><div><br></div><div>KK</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 27, 2017 at 9:37 AM, Serguei Sokol <span dir="ltr"><<a href="mailto:serguei.sokol@gmail.com" target="_blank">serguei.sokol@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can hear from here "Oh no, not again this question!" ;)<br>
But this time it is not a question it is a feature suggestion.<br>
What if we replace in RcppArmadilloWrap.h:64:<br>
template <typename T> SEXP wrap( const arma::Col<T>& data ){<br>
return RcppArmadillo::arma_wrap( data, Dimension( data.n_elem, 1) ) ;<br>
}<br>
by something like:<br>
template <typename T> SEXP wrap( const arma::Col<T>& data ){<br>
#ifdef RETURN_COLVEC_AS_VECTOR<br>
return RcppArmadillo::arma_wrap( data ) ;<br>
#else<br>
return RcppArmadillo::arma_wrap( data, Dimension( data.n_elem, 1) ) ;<br>
#endif<br>
}<br>
<br>
In this way, a legacy code relying on one column matrix is not impacted,<br>
while other users can define a macro RETURN_COLVEC_AS_VECTOR<br>
before "#include <Rcpp>" and enjoy a more intuitive behavior.<br>
<br>
Was it already proposed and rejected?<br>
<br>
Best,<br>
Serguei.<br>
<br>
______________________________<wbr>_________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-pro<wbr>ject.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-projec<wbr>t.org/cgi-bin/mailman/listinfo<wbr>/rcpp-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Qiang Kou<div><a href="mailto:qkou@umail.iu.edu" target="_blank">qkou@umail.iu.edu</a><br><div>School of Informatics and Computing, Indiana University</div><div><br></div></div></div></div>
</div>