diff --git a/R/utils.R b/R/utils.R index c1281ffb3..1b667482f 100644 --- a/R/utils.R +++ b/R/utils.R @@ -927,7 +927,7 @@ binomProbs <- function(x, ...) { #' @export binomProbs.default <- function(x, probs=c(0.025, 0.05, 0.5, 0.95, 0.975), na.rm=FALSE, names=TRUE, onlyProbs=TRUE) { - checkmate::assertIntegerish(x, min.len=1, lower=0.0, upper=1.0) + checkmate::assertNumeric(x, min.len=1, lower=0.0, upper=1.0) x <- as.double(x) checkmate::assertNumeric(probs, min.len=1, any.missing = FALSE, lower=0.0, upper=1.0) checkmate::assertLogical(na.rm, any.missing=FALSE, len=1) diff --git a/src/utilcpp.cpp b/src/utilcpp.cpp index 465f57a87..3dcb097bd 100644 --- a/src/utilcpp.cpp +++ b/src/utilcpp.cpp @@ -178,7 +178,6 @@ NumericVector binomProbs_(NumericVector x, NumericVector probs, bool naRm) { ret[2] = sd; ret[3] = (double)n; - double c = sd/sqrt((double)(n)); for (int i = 0; i < probs.size(); ++i) { double p = probs[i]; std::string str = std::to_string(p*100) + "%";