Skip to content

Commit

Permalink
Update boring.R
Browse files Browse the repository at this point in the history
  • Loading branch information
sjmgarnier committed May 5, 2024
1 parent c961de6 commit 1dac4b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/boring.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ boring <- function(

if (na_rm) {
na_ix <- apply(x, 1, function(r) any(is.na(r))) | is.na(w)
x <- x[!na_ix, ]
x <- x[!na_ix, , drop = FALSE]
w <- w[!na_ix]
}

if (ci) {
bt <- boot::boot(x, function(xi, i) .boring(xi[i, ], w[i]), R = boot_rep, ...)
bt <- boot::boot(x, function(xi, i) .boring(xi[i, , drop = FALSE], w[i]), R = boot_rep, ...)
bt_ci <- boot::boot.ci(bt, boot_conf, "perc")
c(estimate = bt_ci$t0, lower = bt_ci$percent[4], upper = bt_ci$percent[5])
} else {
Expand Down

0 comments on commit 1dac4b8

Please sign in to comment.