[Rd] Some R questions

From: Vladimir Dergachev <vdergachev_at_rcgardis.com>
Date: Tue 31 Oct 2006 - 19:24:01 GMT

Hi all,

   I am working with some large data sets (1-4 GB) and have some questions that I hope someone can help me with:

  1. Is there a way to turn off garbage collector from within C interface ? what I am trying to do is suck data from mysql (using my own C functions) and I see that allocating each column (with about 1-4 million items) takes between 0.5 and 1 seconds. My first thought was that it would be nice to turn off garbage collector, allocate all the data, copy values and then turn the garbage collector back on.
  2. For creating STRSXP should I be using mkChar() or mkString() to create element values ? Is there a way to do it without allocating a cons cell ? (otherwise a single STRSXP with 1e6 length slows down garbage collector)
  3. Is "row.names" attribute required for data frames and, if so, can I use some other type besides STRSXP ?
  4. While poking around to find out why some of my code is excessively slow I have come upon definition of `[.data.frame` - subscription operator for data frames, which appears to be written in R. I am wondering whether I am looking at the right place and whether anyone would be interested in a piece of C code optimizing it - in particular extraction of single element is quite slow (i.e. calls like T[i, j]).
                   thank you very much !

                                 Vladimir Dergachev

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 01 06:26:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 01 Nov 2006 - 03:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.