Displaying 2 results from an estimated 2 matches for "ansptr".
Did you mean:
absptr
2012 Dec 15
3
interfacing with .Call
...r(W, REALSXP));
wptr=REAL(W);
dimxy=getDim(xymod);
PROTECT(xymod=coerceVector(xymod, INTSXP));
xyptr=INTEGER(xymod);
dimif=getDim(modif);
PROTECT(modif=coerceVector(modif, REALSXP));
ifptr=REAL(modif);
//* create SEXP to hold the answer *//
SEXP ans;
double *ansptr;
PROTECT(ans=allocMatrix(REALSXP, dimG[1], dimG[0]));
ansptr=REAL(ans);
//* calculate the result *//
Projector(lptr, dimL, gptr, dimG, wptr, dimW, xyptr, dimxy, ifptr,
dimif, ansptr);
//* wrap up and return the result to R *//
UNPROTECT(6);
return(ans);
}
The functio...
2012 Dec 06
1
Use .Call interface
...r=REAL(modif);
int *dimL; dimL=INTEGER(GET_DIM(L));
int *dimG; dimG=INTEGER(GET_DIM(G));
int *dimW; dimW=INTEGER(GET_DIM(W));
int *dimxy; dimxy=INTEGER(GET_DIM(xymod));
int *dimif; dimif=INTEGER(GET_DIM(modif));
SEXP ans;
PROTECT(ans=allocMatrix(REALSXP, dimG[0], dimL[1])); nprot++;
double *ansptr; ansptr=REAL(ans);
Projector(lptr, dimL, gptr, dimG, wptr, dimW, xyptr, dimxy, ifptr, dimif,
ansptr);
UNPROTECT(nprot);
return ans;
}
The question is that the function "Projector" runs well, but when I try:
R CMD SHLIB Projector2.c Projector.c
It shows:
Projector2.c: In function ...