search for: nfchr

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

2011 Oct 24
2
C function is wrong under Windows 7
...} } void getPmiss(int *sign, int fchrLen, int signLen, double *pmiss) { int i; double tmp = 1.0 / (fchrLen-signLen); for (i = 0; i < fchrLen; ++i) { *(pmiss + i) = tmp; } for (i = 0; i < signLen; ++i) { *(pmiss + sign[i]-1) = 0; } } SEXP getEs(SEXP fchr, SEXP sign) { int i, nfchr, nsign; double *rfchr = REAL(fchr), *res; int *rsign = INTEGER(sign); PROTECT(fchr = coerceVector(fchr, REALSXP)); PROTECT(sign = coerceVector(sign, REALSXP)); nfchr = length(fchr); nsign = length(sign); SEXP es; PROTECT(es = allocVector(REALSXP, nfchr)); res = REAL(es); double nr = g...