RE: [R] Advice for calling a C function

2005-04-27 Thread Huntsinger, Reid
] On Behalf Of Tyler Smith Sent: Tuesday, April 26, 2005 11:02 AM To: R-Help Subject: [R] Advice for calling a C function Hi, I'm having some trouble with a bit of combined C R code. I'm trying to write a C function to handle the for loops in a function I'm working on to calculate a similarity matrix

Re: [R] Advice for calling a C function

2005-04-27 Thread Tyler Smith
] [mailto:[EMAIL PROTECTED] On Behalf Of Tyler Smith Sent: Tuesday, April 26, 2005 11:02 AM To: R-Help Subject: [R] Advice for calling a C function Hi, I'm having some trouble with a bit of combined C R code. I'm trying to write a C function to handle the for loops in a function I'm working

[R] Advice for calling a C function

2005-04-26 Thread Tyler Smith
Hi, I'm having some trouble with a bit of combined C R code. I'm trying to write a C function to handle the for loops in a function I'm working on to calculate a similarity matrix. Jari Oksanen has kindly added the necessary changes to the vegan package so that I can use the vegdist function,

FW: [R] Advice for calling a C function

2005-04-26 Thread Tuszynski, Jaroslaw W.
I think it is a problem with matrices in R and C being stored in different row/column order void gowsim ( double *mat, int *OBJ, int *MATDESC) { double x [*MATDESC][*OBJ]; int i, j, nrow, ncol; nrow = *OBJ; ncol = *MATDESC; /* Rebuild Matrix */ for (j=0; j ncol; j++)