Displaying 1 result from an estimated 1 matches for "mlisttest".
Did you mean:
ilisttest
2004 Jan 09
1
Call and memory
...only. However, I find that I have done nothing to the X in R. It seems
that a copy has been made after all. I may as well call the code with .C
and avoid the use of macros.
Could someone please point out the error in my thinking or suggest a way
to accomplish my goal?
My code follows:
"mListTest" <-
function(X,N,k) {
.Call("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...