[R] ways of getting around allocMatrix limit?

David Romano romanod at grinnell.edu
Tue Jul 31 16:10:37 CEST 2012


I need to multiply to very large, nonsparse matrices, and so get the
error "allocMatrix: too many elements specified".

Is there a way to set the limit for allocMatrix?

In my case, the two matrices, A and B, are nxm and mxp where m is
small, so I could subdivide each into blocks of submatrices
A=rbind(A1,A2,...) and B=cbind(B1,B2,...) then multiply each pair of
submatrices, but I was thinking there must be a better way to get
around the allocMatrix limit.   I'd be grateful for any suggestions!

Thanks,
David



More information about the R-help mailing list