<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; "><div><div><div>I am doing some linear algebra on large matrices in R and receiving the following error: "allocMatrix: too many elements specified". From what I understand, the error is caused by the fact that R uses 32-bit ints and not 64-bit ints for matrix indices, so R doesn't have a way to represent all the elements in the very large matrix.</div><div><br></div><div>My two questions:</div><div><br></div><div>1. Armadillo (and presumably RcppArmadillo) will not have this issue since Armadillo provided support for 64-bit indices as of version 2.4.0. Is there a way to easily utilize this functionality from within RcppArmadillo?</div><div>2. I have found in the past that some of the speeds gains from RcppArmadillo in comparison to pure R are lost when passing large matrices as arguments. There will always be overhead when passing arguments (especially large matrix arguments) to pretty much any function. Are there any tricks to minimize the overhead when passing a non-sparse matrix argument of say 1,000,000 by 500 from R to Armadillo?</div><div><br></div><div>Thanks.</div><div style="font-family: Calibri, sans-serif; "><div><div>-- </div><div><font class="Apple-style-span" face="Calibri,Verdana,Helvetica,Arial"><div>Joshua French, Ph.D.</div><div>Assistant Professor</div><div>Department of Mathematical and Statistical Sciences</div><div>University of Colorado Denver</div><div>Joshua.French@ucdenver.edu</div><div>http://math.ucdenver.edu/~jfrench/</div><div>Ph: 303-556-6265 Fax: 303-556-8550</div></font></div></div><div><br></div></div></div></div></body></html>