CC-ing r-devel for the direct e-mail.
Bernd Kriegstein wrote:
> Hi Hin-Tak,
>
> Thanks for the answer, but it's a little bit
> tangential. Mind you that y is a double pointer,
> commonly used in initialization of matrices. My
> problem is that I cannot eventually access the
> elements of this mat
Please don't do malloc inside C code like this - it won't interact too
well with the garbage collector in R, and your program probably will
either leak or crash or both... and when are you going to do your
free()?
What you want is do is to delete that malloc line and do the
allocation on the R s
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 (