Re: [Rd] reducing a too-large matrix obtained with allocMatrix()

2011-11-01 Thread Simon Urbanek
On Nov 1, 2011, at 4:29 PM, Steven Dirkse wrote: > Hello, > > I have some C code (for a shared lib called via .External) that uses > > PROTECT(w= allocMatrix(REALSXP, m, n)); > > mostly successfully. In rare cases, though, the row count m will be > an overestimate. Is there a way to realloc

[Rd] reducing a too-large matrix obtained with allocMatrix()

2011-11-01 Thread Steven Dirkse
Hello, I have some C code (for a shared lib called via .External) that uses PROTECT(w= allocMatrix(REALSXP, m, n)); mostly successfully. In rare cases, though, the row count m will be an overestimate. Is there a way to reallocate the matrix in-place, something like reAllocMatrix (w,m-excess,