Displaying 1 result from an estimated 1 matches for "transposematrix".
2004 Jan 09
1
Call and memory
...all("mList",as.double(X),as.integer(N),as.integer(k));
}
SEXP mList(
SEXP Xi,
SEXP Ni,
SEXP ki
)
{
double *pX=NUMERIC_POINTER(Xi);
int N=INTEGER_POINTER(Ni)[0];
int k=INTEGER_POINTER(ki)[0];
SEXP alist;
SEXP avector;
SEXP nvector;
SEXP rvector;
SEXP kvector;
int n;
int i;
transposeMatrix(pX,N,k);
n=4;
PROTECT(alist=NEW_LIST(n));
PROTECT(avector=NEW_NUMERIC(200));
for (i=0;i<200;i++) {
NUMERIC_POINTER(avector)[i]=pX[i];
}
SET_ELEMENT(alist,0,avector);
UNPROTECT(1);
PROTECT(nvector=NEW_INTEGER(1));
INTEGER_POINTER(nvector)[0]=N;
SET_ELEMENT(alist,1,nvector);
UNPROTE...