[Rd] double pointer matrix

2006-03-07 Thread Bernd Kriegstein
Hello, I'm having some difficulty to understand how I could take the proper result from the following listing: -- cut --- #include #include #include void retMat ( double **y, int *n, int *m, double *a, double *b) { int i, j; y = malloc( (*n) * sizeof( double ) ); for (

Re: [Rd] simple C function segfaults

2006-02-21 Thread Bernd Kriegstein
n Tue, 21 Feb 2006, Bernd Kriegstein wrote: > > > I use the simplest of examples that somebody can > think > > of in order to generate a matrix of random numbers > > from within C, calling appropriate R functions. > The > > concrete example is below: > &g

Re: [Rd] simple C function segfaults

2006-02-20 Thread Bernd Kriegstein
order for the column-major mode index in the #define to work? Thanks, - b. --- Berwin A Turlach <[EMAIL PROTECTED]> schrieb: > >>>>> "BK" == Bernd Kriegstein <[EMAIL PROTECTED]> > writes: > > BK> void pico ( double *y, int n, int m ) >

[Rd] simple C function segfaults

2006-02-20 Thread Bernd Kriegstein
Hello, I use the simplest of examples that somebody can think of in order to generate a matrix of random numbers from within C, calling appropriate R functions. The concrete example is below: --- file pico.c #include #include #include #include #include #define COLM( i, j, m ) ( m*j + i) v