search for: fchr

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

Did you mean: chr
2011 Oct 24
2
C function is wrong under Windows 7
...e: #include "getEs.h" #include <R.h> #include <Rinternals.h> double absolute(double x) { if (x<0) return (-x); else return (x); } void cumsum(double *x, int len) { int i; for (i = 1; i < len; ++i) { *(x + i) = *(x + i) + *(x + i -1); } } double getNr(double *fchr, int *sign, int signLen) { int i; double nr; nr = 0.0; for (i = 0; i < signLen; ++i) { nr = absolute(fchr[sign[i] -1]) + nr; } return nr; } void getPhit(double *fchr, int *sign, int signLen, double nr, double *phit) { int i; for (i = 0; i < signLen; ++i) { *(phit + sign[i]-1)...