Hi, Alessandro,
I have confirmed and reproduced your error.
It should be a bug and it is in
https://github.com/RcppCore/Rcpp/blob/master/inst/include/Rcpp/vector/MatrixColumn.h#L39
In your case, i and n both are integers, but i * n caused an overflow. We
will fix this soon.
Thank you for the te
On 1 November 2015 at 19:35, Alessandro Mammana wrote:
| As Sean O'Riordain correctly pointed out, I used the install_github
| command improperly. Doing
|
| devtools::install_github("RcppCore/Rcpp")
Oh noes. install_gitub() is not what one should use when we have drat.
I just rolled the Rcp
I got another error when using the Matrix.column() function, as in the
code below:
#include
#include "array.cpp"
// [[Rcpp::export]]
Rcpp::IntegerMatrix makeMat(int nrow=18, int ncol=136633572){
Rcpp::IntegerMatrix mat(nrow, ncol);
for (int i = 0; i < ncol; ++i) {
As Sean O'Riordain correctly pointed out, I used the install_github
command improperly. Doing
devtools::install_github("RcppCore/Rcpp")
works and the big matrix is allocated correctly.
Thanks for the help and for the great work you are doing!
Ale
On Sun, Nov 1, 2015 at 6:30 PM, Alessandro Mamma
It's great that R and Rcpp have support for long vectors! that makes
my life so much easier!
So I installed Rcpp version 0.12.1 and the error is still there (see
end of the email). If I interpret the commit history correctly, the
commit that fixes the bug was done shortly after the 0.12.1 release
The bug is probably fixed by this commit:
https://github.com/RcppCore/Rcpp/commit/eb069bf5c20aaa4d38e0ca2897bf04e956cb8c4c
Le 31/10/2015 20:08, Alessandro Mammana a écrit :
Dear All,
When creating a large matrix with the follwing code:
#include
// [[Rcpp::export]]
Rcpp::IntegerMatrix makeMat(i
On Sat, Oct 31, 2015 at 3:08 PM, Alessandro Mammana
wrote:
> Dear All,
> When creating a large matrix with the follwing code:
>
> #include
> // [[Rcpp::export]]
> Rcpp::IntegerMatrix makeMat(int nrow, int ncol){
> Rcpp::IntegerMatrix mat(nrow, ncol);
> return mat;
> }
>
> I get t
On 31 October 2015 at 19:08, Alessandro Mammana wrote:
| Dear All,
| When creating a large matrix with the follwing code:
|
| #include
| // [[Rcpp::export]]
| Rcpp::IntegerMatrix makeMat(int nrow, int ncol){
| Rcpp::IntegerMatrix mat(nrow, ncol);
| return mat;
| }
|
| I get the
Dear All,
When creating a large matrix with the follwing code:
#include
// [[Rcpp::export]]
Rcpp::IntegerMatrix makeMat(int nrow, int ncol){
Rcpp::IntegerMatrix mat(nrow, ncol);
return mat;
}
I get the error:
Error in .Primitive(".Call")(, nrow, ncol) :
negative length vectors