Re: [R] Load the shared object/DLL

2008-04-16 Thread Guohui Ding
:) Thanks. I owe you an apology and retract it, as I copied the codes from others and did not check the origin of these codes. 2008/4/16, Prof Brian Ripley <[EMAIL PROTECTED]>: > > On Wed, 16 Apr 2008, Guohui Ding wrote: > > Dear All, > > > > I have written a function in c (in a file named 'a.c')

Re: [R] Load the shared object/DLL

2008-04-16 Thread Prof Brian Ripley
On Wed, 16 Apr 2008, Guohui Ding wrote: > Dear All, > > I have written a function in c (in a file named 'a.c') as follows, *PLEASE* don't claim credit for the work of others (in this case it is me that you owe the apology and retraction to). That is from 'S Programming' p. 126, and 'Writing R

[R] Load the shared object/DLL

2008-04-16 Thread Guohui Ding
Dear All, I have written a function in c (in a file named 'a.c') as follows, void convolve(double *a, int *na, double *b, int *nb, double *ab) { int i, j, nab = *na + *nb - 1; for(i = 0; i < nab; i++) ab[i] = 0.0; for(i = 0; i < *na; i++) for(j = 0; j < *nb; j++) ab[i + j] += a