Can you give more information on why we need this or what problem people
are facing now?

Best,

KK

On Thu, Jul 27, 2017 at 9:37 AM, Serguei Sokol <[email protected]>
wrote:

> I can hear from here "Oh no, not again this question!" ;)
> But this time it is not a question it is a feature suggestion.
> What if we replace in RcppArmadilloWrap.h:64:
>     template <typename T> SEXP wrap( const arma::Col<T>& data ){
>         return RcppArmadillo::arma_wrap( data, Dimension( data.n_elem, 1)
> ) ;
>     }
> by something like:
>     template <typename T> SEXP wrap( const arma::Col<T>& data ){
> #ifdef RETURN_COLVEC_AS_VECTOR
>         return RcppArmadillo::arma_wrap( data ) ;
> #else
>         return RcppArmadillo::arma_wrap( data, Dimension( data.n_elem, 1)
> ) ;
> #endif
>     }
>
> In this way, a legacy code relying on one column matrix is not impacted,
> while other users can define a macro RETURN_COLVEC_AS_VECTOR
> before "#include <Rcpp>" and enjoy a more intuitive behavior.
>
> Was it already proposed and rejected?
>
> Best,
> Serguei.
>
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>



-- 
Qiang Kou
[email protected]
School of Informatics and Computing, Indiana University
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to