Re: [Rcpp-devel] Overflow error when creating a large matrix

2015-10-31 Thread Dirk Eddelbuettel
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

[Rcpp-devel] Overflow error when creating a large matrix

2015-10-31 Thread Alessandro Mammana
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