>>>>> "Mitchell" == Mitchell Skinner <[EMAIL PROTECTED]> >>>>> 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 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel