| 1 |
skip_on_cran() |
| 2 |
|
| 3 |
skip_if_not_installed("modeltests") |
| 4 |
library(modeltests) |
| 5 |
|
| 6 |
skip_if_not_installed("binGroup") |
| 7 |
suppressPackageStartupMessages(library(binGroup)) |
| 8 |
|
| 9 |
bw <- binWidth(100, .1) |
| 10 |
bd <- binDesign(nmax = 300, delta = 0.06, p.hyp = 0.1, power = .8) |
| 11 |
|
| 12 |
test_that("binGroup tidier arguments", { |
| 13 |
check_arguments(tidy.binWidth) |
| 14 |
check_arguments(tidy.binDesign) |
| 15 |
check_arguments(glance.binDesign) |
| 16 |
}) |
| 17 |
|
| 18 |
test_that("tidy.binWidth", { |
| 19 |
td <- tidy(bw) |
| 20 |
check_tidy_output(td) |
| 21 |
check_dims(td, 1, 4) |
| 22 |
}) |
| 23 |
|
| 24 |
test_that("tidy.binDesign", { |
| 25 |
td <- tidy(bd) |
| 26 |
check_tidy_output(td) |
| 27 |
check_dims(td, expected_cols = 2) |
| 28 |
}) |
| 29 |
|
| 30 |
test_that("glance.binDesign", { |
| 31 |
gl <- glance(bd) |
| 32 |
check_glance_outputs(gl) |
| 33 |
check_dims(gl, expected_cols = 4) |
| 34 |
}) |