uan Qiu
> *Sent:* November 26, 2014 2:13 AM
> *To:* David Shih
> *Cc:* rcpp-devel@lists.r-forge.r-project.org
> *Subject:* Re: [Rcpp-devel] Rcpp: Modification of input argument:
> Undefined behaviour
>
>
> Hello David,
> The general answer to your question is, if the type
2:13 AM
To: David Shih
Cc: rcpp-devel@lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] Rcpp: Modification of input argument: Undefined
behaviour
Hello David,
The general answer to your question is, if the type of your matrix (integer or
numeric) in R is different from the one you declare in Rcpp,
On 26 November 2014 at 02:13, Yixuan Qiu wrote:
| Hello David,
| The general answer to your question is, if the type of your matrix (integer or
| numeric) in R is different from the one you declare in Rcpp, Rcpp will make a
| copy and cast it to the appropriate type.
Precisely.
| For example,
Hello David,
The general answer to your question is, if the type of your matrix (integer
or numeric) in R is different from the one you declare in Rcpp, Rcpp will
make a copy and cast it to the appropriate type.
For example, 1:12 is of type integer, and if you pass it as a
NumericMatrix, Rcpp will