search for: tmatrixprod

Displaying 1 result from an estimated 1 matches for "tmatrixprod".

2006 Aug 03
1
question about dll crashing R
...tate(); F77_CALL(dpofa) ( REAL( cov ), &nry , &ncy , &info); Rprintf("Info = %d\n",info); for(i=0;i<nry;i++) for(j=0;j<i;j++) REAL(cov)[i+j*ncy] = 0.0; PROTECT( ans = allocMatrix (mode, nrx , one ) ) ; for(i=0;i<nry;i++) REAL(temp)[i] = rnorm(0,1); ans = tmatrixprod(cov,temp); for(i=0;i<nry;i++) REAL(ans)[i] = REAL(ans)[i]+REAL(mean)[i]; UNPROTECT( 1 ) ; PutRNGstate(); return( ans ) ; } I have a feeling I am messing up memory usage somewhere but haven't a clue. Do I need to do garbage collecting inside the C program ?The fact that the code runs a...