[Rd] reshape scaling with large numbers of times/rows
Martin Maechler
maechler at stat.math.ethz.ch
Thu Aug 24 10:21:58 CEST 2006
>>>>> "Mitchell" == Mitchell Skinner <mitch at arctur.us>
>>>>> on Thu, 24 Aug 2006 00:26:52 -0700 writes:
Mitchell> I wrote:
>> It still needs some debugging, to put it mildly
>> (doesn't work properly on reals), but the basic idea appears to work.
Mitchell> It works for reals on a 64-bit machine, but not on
Mitchell> a 32-bit machine. I figure the culprit is this
Mitchell> bit of c code:
Mitchell> SET_VECTOR_ELT(wideCol, wideRow, VECTOR_ELT(longCol, rowNum));
Mitchell> It seems like VECTOR_ELT and/or SET_VECTOR_ELT
Mitchell> assumes that the vector elements are word-sized.
No. It assumes that use what the C API calls 'VECTOR' and R users
usually call list()s !!!
Do reread that part in the "Writing R Extensions" and rather
look at REAL(.)[.] and REAL(.)[] = ..
Martin
More information about the R-devel
mailing list