search for: nppm

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

Did you mean: npm
2004 Jul 20
0
Suggestion for quantile.default()
...stop("type outside range [1,9]") np <- length(probs) n <- length(x) if (n > 0 && np > 0) { if (type <= 3) { ## Types 1, 2 and 3 are discontinuous sample qs. if (type == 3) nppm <- n * probs - .5 # n * probs + m; m = -0.5 else nppm <- n * probs # m = 0 j <- floor(nppm) switch(type, h <- ifelse(nppm > j, 1, 0), # type 1 h <- i...
2019 May 31
2
[patch] add sanity checks to quantile()
...ype = c(1, 2)) quantile(vec, type = 10) quantile(vec, type = "aaa") quantile(vec, type = NA_real_) quantile(vec, type = 4.3) quantile(vec, type = -1) Current behavior (i.e., without the patch): > vec <- 1:10 > quantile(vec, type = c(1, 2)) Error in switch(type, (nppm > j), ((nppm > j) + 1)/2, (nppm != j) | ((j%%2L) == : EXPR must be a length 1 vector In addition: Warning messages: 1: In if (type == 7) { : the condition has length > 1 and only the first element will be used 2: In if (type <= 3) { : the condition has length > 1...
2020 Jan 04
0
[patch] add sanity checks to quantile()
...uantile(vec, type = "aaa") > quantile(vec, type = NA_real_) > quantile(vec, type = 4.3) > quantile(vec, type = -1) > > Current behavior (i.e., without the patch): > > > vec <- 1:10 > > quantile(vec, type = c(1, 2)) > Error in switch(type, (nppm > j), ((nppm > j) + 1)/2, (nppm != j) | ((j%%2L) == : > EXPR must be a length 1 vector > In addition: Warning messages: > 1: In if (type == 7) { : > the condition has length > 1 and only the first element will be used > 2: In if (type <= 3) { : > th...