Displaying 1 result from an estimated 1 matches for "esscore".
Did you mean:
escore
2009 Apr 09
1
.Call()
...,2]==1)))
pmiss <- sum(rep(1/(N-Ns), sum(ranklist[1:j,2]==0)))
if((phit-pmiss)>score[i]) score[i] <- phit - pmiss
}
}
I tried a little bit, but not enough knowledge in C.
#include <stdio.h>
#include <R.h>
#include <Rdefines.h>
#include <math.h>
SEXP ESscore(SEXP Rgeneset, SEXP Rgenemat, SEXP Rranklist, SEXP sim)
{
int nc = ncols(Rgenemat);
double *geneset = NUMERIC_DATA(Rgeneset);
double *genemat = NUMERIC_DATA(Rgenemat);
SEXP Rscore;
PROTECT(Rscore=NEW_NUMERIC(sim));
double *score = NUMERIC_DATA(Rscore);
for(i=1; i<=sim; i++){
if(i&g...