RE: [Rd] type of list elements in .Call

2005-01-31 Thread Huntsinger, Reid
This just means that R doesn't currently do anything complicated when you ask for a pointer to the data in an R vector object. But that doesn't matter; the behavior of REAL etc doesn't depend on that. Note that INTEGER, REAL, etc just give you pointers of type int *, double *, etc. It's up to you

[Rd] RE: [R] Keeping the data of C structure in R variables?..

2005-02-04 Thread Huntsinger, Reid
I think you should have a look at external pointers (type EXTPTRSXP). They are used in the R source . See, for example, memory.c. Also see the developer page notes on weak references, finalizers, etc, which you'll need to be familiar with. This is really an R-devel question! Reid Huntsinger ---

[Rd] RE: [R] Advice for calling a C function

2005-04-27 Thread Huntsinger, Reid
You have the dimensions switched, in double x [*MATDESC][*OBJ]; so when the dimensions aren't equal you do get odd things. You might be better off defining functions to index into mat with a pair of subscripts directly (.C() copies the argument anyway). Come to think of it, there might be macro

[Rd] dotcode typo?

2005-06-02 Thread Huntsinger, Reid
I ran across the following in the R-2.0.1 source, src/main/dotcode.c, in the function resolveNativeRoutine(), lines 146-163. Line 152 looks like a typo: here are lines 149-155 if(!*fun) { if(dll.type != FILENAME) { *fun = R_FindNativeSymbolFromDLL(buf, &dll, symbol);

RE: [Rd] dotcode typo?

2005-06-02 Thread Huntsinger, Reid
Sorry, I was looking at 2.0.1 when I meant to be looking at 2.1.0. The line numbers for the latter are 161-179 and line 164 is the one with what I think is a typo. Reid Huntsinger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Huntsinger, Reid Sent