Skip to content

Commit 58d6440

Browse files
committed
Fix checks
1 parent bdfc665 commit 58d6440

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

R/boot_ci.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' should be any subset of the values `c("norm","basic", "stud", "perc", "bca")` or simply `"all"` which will
1313
#' compute all five types of intervals.
1414
#' @param stype (`string`)\cr a character string indicating what the second argument of statistic represents.
15-
#' Possible values of stype are `"i"` (indices - the default), `"f"` (frequencies), or `"w"` (weights).
15+
#' Possible values of `stype` are `"i"` (indices - the default), `"f"` (frequencies), or `"w"` (weights).
1616
#' @param statistic (`function`)\cr a function which, when applied to data, returns a vector containing the
1717
#' statistic(s) of interest. See the parameter description in [boot::boot()] for details.
1818
#'
@@ -66,7 +66,6 @@ boot_ci <- function(x,
6666
paste0("All values of t are equal to ", boot$t0, ". Cannot calculate confidence intervals."),
6767
call = get_cli_abort_call()
6868
)
69-
7069
} else {
7170
boot.ci <- boot::boot.ci(boot, conf = conf.level, type = type)
7271

man/boot_ci.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/_snaps/boot_ci.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@
3838
3 AGE continuo… conf.level conf.lev… 0.95 bootstra…
3939
4 AGE continuo… R R 2000 bootstra…
4040
5 AGE continuo… ci.type.1 ci.type.1 normal bootstra…
41-
6 AGE continuo… conf.low.1 conf.low… 74.074 bootstra…
42-
7 AGE continuo… conf.high.1 conf.hig… 76.094 bootstra…
41+
6 AGE continuo… conf.low.1 conf.low… 74.081 bootstra…
42+
7 AGE continuo… conf.high.1 conf.hig… 76.11 bootstra…
4343
8 AGE continuo… ci.type.2 ci.type.2 basic bootstra…
44-
9 AGE continuo… conf.low.2 conf.low… 74.091 bootstra…
45-
10 AGE continuo… conf.high.2 conf.hig… 76.063 bootstra…
44+
9 AGE continuo… conf.low.2 conf.low… 74.114 bootstra…
45+
10 AGE continuo… conf.high.2 conf.hig… 76.153 bootstra…
4646
11 AGE continuo… ci.type.3 ci.type.3 percent bootstra…
47-
12 AGE continuo… conf.low.3 conf.low… 74.11 bootstra…
48-
13 AGE continuo… conf.high.3 conf.hig… 76.083 bootstra…
47+
12 AGE continuo… conf.low.3 conf.low… 74.02 bootstra…
48+
13 AGE continuo… conf.high.3 conf.hig… 76.059 bootstra…
4949
14 AGE continuo… ci.type.4 ci.type.4 bca bootstra…
50-
15 AGE continuo… conf.low.4 conf.low… 74.076 bootstra…
51-
16 AGE continuo… conf.high.4 conf.hig… 76.075 bootstra…
50+
15 AGE continuo… conf.low.4 conf.low… 73.992 bootstra…
51+
16 AGE continuo… conf.high.4 conf.hig… 76.04 bootstra…
5252
Message
5353
i 2 more variables: fmt_fn, error
5454

tests/testthat/test-boot_ci.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
skip_if_not(do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "boot", reference_pkg = "cardx")))
22

33
test_that("boot_ci() works with standard use", {
4-
set.seed(1)
54
x <- cards::ADSL$AGE
65

6+
set.seed(1)
77
res <- boot_ci(x, type = "perc")
88
expect_snapshot(res)
99

10+
set.seed(1)
1011
res <- cards::ADSL |>
1112
cards::ard_continuous(
1213
variables = AGE,

0 commit comments

Comments
 (0)