[Rd] Some R questions
Vladimir Dergachev
vdergachev at rcgardis.com
Tue Oct 31 20:24:01 CET 2006
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
More information about the R-devel
mailing list