search for: real_no_na

Displaying 3 results from an estimated 3 matches for "real_no_na".

2019 May 01
3
anyNA() performance on vectors of POSIXct
...quot;is.na"), x)); SEXP e = PROTECT(lang2(install("any"), e0)); SEXP res = PROTECT(eval(e, env)); int ans = asLogical(res); UNPROTECT(3); return ans == 1; // so NA answer is false. } R_xlen_t i, n = xlength(x); switch (xT) { case REALSXP: { if(REAL_NO_NA(x)) return FALSE; ITERATE_BY_REGION(x, xD, i, nbatch, double, REAL, { for (int k = 0; k < nbatch; k++) if (ISNAN(xD[k])) return TRUE; }); break; } [[alternative HTML version deleted]]
2019 Sep 04
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
...S = INT_MIN, /*INT_MIN is NA_INTEGER! */ SORTED_INCR = 1, SORTED_INCR_NA_1ST = 2, KNOWN_UNSORTED = 0}; The macro names are pretty self-explanatory. The current implementation only supports the ascending sort. 2. For anyNA, it goes to(Real SEXP) ===========coerce.c=========== if(REAL_NO_NA(x)) return FALSE; ITERATE_BY_REGION(x, xD, i, nbatch, double, REAL, { for (int k = 0; k < nbatch; k++) if (ISNAN(xD[k])) return TRUE; }); ===========altrep.c=========== int REAL_NO_NA(SEXP x) { return ALTREP(x) ? ALTREAL_DISPATCH(No_NA, x) : 0; } If the argument x is not an ALTREP...
2019 May 21
0
anyNA() performance on vectors of POSIXct
...all("any"), e0)); > SEXP res = PROTECT(eval(e, env)); > int ans = asLogical(res); > UNPROTECT(3); > return ans == 1; // so NA answer is false. > } > > R_xlen_t i, n = xlength(x); > switch (xT) { > case REALSXP: > { > if(REAL_NO_NA(x)) > return FALSE; > ITERATE_BY_REGION(x, xD, i, nbatch, double, REAL, { > for (int k = 0; k < nbatch; k++) > if (ISNAN(xD[k])) > return TRUE; > }); > break; > } >