[R] Internal data types
John D. Barnett
jbarnett at wi.mit.edu
Tue Nov 23 22:24:39 CET 1999
Hi-
I'm very interested in using R, though I am still new to it. However,
all of the data I'm working with is currently stored in Oracle. So,
either I get data from Oracle, save it to a text file, and then import
it to R, or I write an R <-> Oracle bridge. I've taken the second
approach, but I'm sure that I haven't done it entirely correctly.
For starters, is there any unified documentation for the R/C interface?
I can currently get back the results of a SQL query in a list of
vectors; however, the process is quite slow and CPU intensive. This is
probably because I fill in the data structure in R, and call C to get
every single value. It makes more sense to me to loop in C and create
the entire data structure there, but I'm not quite sure how to approach
this.
I think that what I want to do is actually create the appropriate SEXPR
for a list, with each element being a vector (numeric or string). This
would presumably be through allocList() and allocVector(), but how then
do I access individual elements of an SEXPR (list or vector) from C?
(i.e., are there access functions that I'm missing, or do I have to wade
through the structure definition of SEXPR?)
Also, if I create the whole object in C, should I use dup=TRUE or FALSE
in the .C call?
Am I on the right track?
Thanks to anyone with more experience who can point me in the right
direction.
-John
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list