Skip to content

Commit a4d7275

Browse files
committed
fix output change of boot-package in vignette
1 parent 1938d5d commit a4d7275

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vignettes/simTool.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ post_analyze <- function(o, .truth) {
559559
#post-process the object returned by boot.ci
560560
method = c("normal", "basic", "student", "percent", "bca")
561561
ret = o[method]
562-
lower = unlist(purrr::map(ret, ~dplyr::nth(.x, -2)))
563-
upper = sapply(ret, dplyr::last)
562+
lower = unlist(purrr::map(ret, ~dplyr::nth(.x[1,], -2)))
563+
upper = unlist(purrr::map(ret, ~dplyr::nth(.x[1,], -1)))
564564
type = paste("boot", method, sep = "_")
565565
566566
return(
@@ -657,8 +657,8 @@ bootstrap_ci <- function(x, conf.level, R = 999) {
657657
ci <- boot::boot.ci(b, conf = conf.level, type = "all")
658658
method = c("normal", "basic", "student", "percent", "bca")
659659
ret = ci[method]
660-
lower = unlist(purrr::map(ret, ~dplyr::nth(.x, -2)))
661-
upper = sapply(ret, dplyr::last)
660+
lower = unlist(purrr::map(ret, ~dplyr::nth(.x[1,], -2)))
661+
upper = unlist(purrr::map(ret, ~dplyr::nth(.x[1,], -1)))
662662
type = paste("boot", method, sep = "_")
663663
664664
# unify return

0 commit comments

Comments
 (0)