Skip to content

Commit

Permalink
rename multi to multi_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
joethorley committed Jan 8, 2024
1 parent bbe1b1a commit 5aa0dbc
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions R/hc.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ssd_hc.fitdists <- function(
delta = delta,
min_pboot = min_pboot,
parametric = parametric,
multi = multi_ci,
multi_ci = multi_ci,
fix_weights = weighted,
control = control,
samples = samples,
Expand Down Expand Up @@ -150,7 +150,7 @@ ssd_hc.fitburrlioz <- function(x, percent = 5, ci = FALSE, level = 0.95, nboot =
delta = Inf,
min_pboot = min_pboot,
parametric = parametric,
multi = TRUE,
multi_ci = TRUE,
save_to = save_to,
samples = samples,
control = NULL,
Expand Down
10 changes: 5 additions & 5 deletions R/hcp.R
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ hcp_weighted <- function(hcp, weight, value, method, nboot) {
multi_est,
min_pboot,
parametric,
multi,
multi_ci,
fix_weights,
control,
hc,
Expand Down Expand Up @@ -321,7 +321,7 @@ hcp_weighted <- function(hcp, weight, value, method, nboot) {
return(hcp)
}

if(multi) {
if(multi_ci) {
hcp <- .ssd_hcp_multi(
x, value, ci = ci, level = level, nboot = nboot,
min_pboot = min_pboot,
Expand Down Expand Up @@ -354,7 +354,7 @@ ssd_hcp_fitdists <- function(
delta,
min_pboot,
parametric,
multi,
multi_ci,
control,
samples,
save_to,
Expand All @@ -377,7 +377,7 @@ ssd_hcp_fitdists <- function(
chk_number(min_pboot)
chk_range(min_pboot)
chk_flag(parametric)
chk_flag(multi)
chk_flag(multi_ci)
chk_flag(fix_weights)
chk_null_or(control, vld = vld_list)
chk_null_or(save_to, vld = vld_dir)
Expand All @@ -395,7 +395,7 @@ ssd_hcp_fitdists <- function(
multi_est = multi_est,
min_pboot = min_pboot,
parametric = parametric,
multi = multi,
multi_ci = multi_ci,
fix_weights = fix_weights,
control = control,
save_to = save_to,
Expand Down
4 changes: 2 additions & 2 deletions R/hp.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ssd_hp.fitdists <- function(
hcp <- ssd_hcp_fitdists(
x = x, value = conc, ci = ci, level = level, nboot = nboot,
average = average, multi_est = multi_est, delta = delta, min_pboot = min_pboot,
parametric = parametric, multi = multi_ci, control = control,
parametric = parametric, multi_ci = multi_ci, control = control,
save_to = save_to, samples = samples, hc = FALSE, fix_weights = weighted,
)
hcp <- dplyr::rename(hcp, conc = "value")
Expand Down Expand Up @@ -88,7 +88,7 @@ ssd_hp.fitburrlioz <- function(x, conc = 1, ci = FALSE, level = 0.95, nboot = 10
delta = Inf,
min_pboot = min_pboot,
parametric = parametric,
multi = TRUE,
multi_ci = TRUE,
control = NULL,
save_to = save_to,
samples = samples,
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/_snaps/hc-root.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hc multi lnorm
# hc multi_ci lnorm

Code
hc_multi
Expand All @@ -8,7 +8,7 @@
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <int> <dbl> <I<list>>
1 average 5 1.68 NA NA NA 1 parametric 0 NA <dbl [0]>

# hc multi all
# hc multi_ci all

Code
hc_multi
Expand All @@ -18,7 +18,7 @@
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <int> <dbl> <I<list>>
1 average 5 1.26 NA NA NA 1 parametric 0 NA <dbl [0]>

# hc multi all multiple hcs
# hc multi_ci all multiple hcs

Code
hc_multi
Expand All @@ -29,7 +29,7 @@
1 average 5 1.26 NA NA NA 1 parametric 0 NA <dbl [0]>
2 average 10 2.38 NA NA NA 1 parametric 0 NA <dbl [0]>

# hc multi all multiple hcs cis
# hc multi_ci all multiple hcs cis

Code
hc_multi
Expand All @@ -40,7 +40,7 @@
1 average 5 1.26 0.621 0.492 2.12 1 parametric 10 1 <dbl [0]>
2 average 10 2.38 0.930 1.17 3.60 1 parametric 10 1 <dbl [0]>

# hc multi lnorm ci
# hc multi_ci lnorm ci

Code
hc_average
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/_snaps/hp-root.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hp multi lnorm
# hp multi_ci lnorm

Code
hp_multi
Expand All @@ -8,7 +8,7 @@
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <int> <dbl> <I<list>>
1 average 1 1.95 NA NA NA 1 parametric 0 NA <dbl [0]>

# hp multi all
# hp multi_ci all

Code
hp_multi
Expand All @@ -18,7 +18,7 @@
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <int> <dbl> <I<list>>
1 average 1 3.90 NA NA NA 1 parametric 0 NA <dbl [0]>

# hp multi lnorm ci
# hp multi_ci lnorm ci

Code
hp_average
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/zzz-unstable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hc multi lnorm default 100
# hc multi_ci lnorm default 100

Code
hc_average
Expand All @@ -18,7 +18,7 @@
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <dbl> <I<list>>
1 average 5 1.26 0.774 0.410 3.25 1 parametric 100 0.86 <dbl>

# hp multi lnorm default 100
# hp multi_ci lnorm default 100

Code
hp_average
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-hc-root.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

test_that("hc multi lnorm", {
test_that("hc multi_ci lnorm", {
fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm")
set.seed(102)
hc_dist <- ssd_hc(fits, average = FALSE, multi_ci = FALSE, weighted = FALSE)
Expand All @@ -27,7 +27,7 @@ test_that("hc multi lnorm", {
})
})

test_that("hc multi all", {
test_that("hc multi_ci all", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hc_average <- ssd_hc(fits, average = TRUE, multi_ci = FALSE)
Expand All @@ -39,7 +39,7 @@ test_that("hc multi all", {
})
})

test_that("hc multi all multiple hcs", {
test_that("hc multi_ci all multiple hcs", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hc_average <- ssd_hc(fits, percent = c(5,10), average = TRUE, multi_ci = FALSE, weighted = FALSE)
Expand All @@ -51,7 +51,7 @@ test_that("hc multi all multiple hcs", {
})
})

test_that("hc multi all multiple hcs cis", {
test_that("hc multi_ci all multiple hcs cis", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hc_average <- ssd_hc(fits, percent = c(5,10), average = TRUE, multi_ci = FALSE, nboot = 10, ci = TRUE, weighted = FALSE)
Expand All @@ -64,7 +64,7 @@ test_that("hc multi all multiple hcs cis", {
})
})

test_that("hc multi lnorm ci", {
test_that("hc multi_ci lnorm ci", {
fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm")
set.seed(102)
hc_dist <- ssd_hc(fits, average = FALSE, ci = TRUE, nboot = 100, multi_ci = FALSE, weighted = FALSE)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-hc.R
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ test_that("ssd_hc multiple values save_to", {
"estimates_000000002_multi.rds"))
})

test_that("ssd_hc not multi save_to", {
test_that("ssd_hc not multi_ci save_to", {
dir <- withr::local_tempdir()

fits <- ssd_fit_dists(ssddata::ccme_boron, dist = c("lnorm", "lgumbel"))
Expand Down Expand Up @@ -687,7 +687,7 @@ test_that("ssd_hc identical if in parallel", {
expect_identical(hc, hc2)
})

test_that("hc multi false weighted", {
test_that("hc multi_ci false weighted", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hc <- ssd_hc(fits, ci = TRUE, nboot = 10, average = TRUE, samples = TRUE, multi_ci = FALSE, weighted = TRUE)
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-hp-root.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

test_that("hp multi lnorm", {
test_that("hp multi_ci lnorm", {

fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm")
set.seed(102)
Expand All @@ -30,7 +30,7 @@ test_that("hp multi lnorm", {
})
})

test_that("hp multi all", {
test_that("hp multi_ci all", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hp_average <- ssd_hp(fits, average = TRUE)
Expand All @@ -43,7 +43,7 @@ test_that("hp multi all", {
})
})

test_that("hp multi lnorm ci", {
test_that("hp multi_ci lnorm ci", {
fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm")
set.seed(102)
hp_dist <- ssd_hp(fits, average = FALSE, ci = TRUE, nboot = 100, multi_ci = FALSE, weighted = FALSE)
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-zzz-unstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test_that("weibull is unstable", {
expect_identical(names(fits), c('gamma', 'weibull'))
})

test_that("hc multi lnorm default 100", {
test_that("hc multi_ci lnorm default 100", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hc_average <- ssd_hc(fits, average = TRUE, ci = TRUE, nboot = 100, multi_ci = FALSE, samples = TRUE, weighted = FALSE)
Expand All @@ -55,9 +55,9 @@ test_that("hc multi lnorm default 100", {
hc_average
})

# not sure why hc multi is different on windows
# not sure why hc multi_ci is different on windows
# ══ Failed tests ════════════════════════════════════════════════════════════════
# ── Failure ('test-hc-root.R:77:3'): hc multi lnorm default 100 ─────────────────
# ── Failure ('test-hc-root.R:77:3'): hc multi_ci lnorm default 100 ─────────────────
# Snapshot of code has changed:
# old[4:7] vs new[4:7]
# # A tibble: 1 x 10
Expand All @@ -72,7 +72,7 @@ test_that("hc multi lnorm default 100", {
})
})

test_that("hp multi lnorm default 100", {
test_that("hp multi_ci lnorm default 100", {
fits <- ssd_fit_dists(ssddata::ccme_boron)
set.seed(102)
hp_average <- ssd_hp(fits, average = TRUE, ci = TRUE, nboot = 100, multi_ci = FALSE, samples = TRUE, weighted = FALSE)
Expand All @@ -85,7 +85,7 @@ test_that("hp multi lnorm default 100", {
})
testthat::skip_on_ci()
testthat::skip_on_cran()
# ── Failure ('test-hp-root.R:79:3'): hp multi lnorm default 100 ─────────────────
# ── Failure ('test-hp-root.R:79:3'): hp multi_ci lnorm default 100 ─────────────────
# Snapshot of code has changed:
# old[4:7] vs new[4:7]
# # A tibble: 1 x 10
Expand Down

0 comments on commit 5aa0dbc

Please sign in to comment.