Skip to content

Commit 4455fc7

Browse files
pipes!
1 parent b33820a commit 4455fc7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tests/testthat/test-simulatePedigree.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ test_that("simulated pedigree generates expected data structure when sexR is imb
126126
expect_equal(max(results$gen), Ngen, tolerance = strict_tolerance)
127127

128128
# expect there to be parents in each for all generations except the first one
129-
filter_parents <- results |>
130-
dplyr::group_by(gen) |>
129+
filter_parents <- dplyr::group_by(results, gen) %>%
131130
dplyr::summarize(num_parents = sum(!is.na(dadID), na.rm = TRUE) + sum(!is.na(momID), na.rm = TRUE))
132131

133132
expect_true(all(filter_parents$num_parents[filter_parents$gen > 1] > 0), info = paste0("Beta option: ", beta))
@@ -199,8 +198,7 @@ test_that("simulated pedigree generates expected data structure but supply var n
199198
expect_lt(sex_mean_male, sex_mean_female)
200199

201200
# expect there to be parents in each for all generations except the first one
202-
filter_parents <- results |>
203-
dplyr::group_by(gen) |>
201+
filter_parents <- dplyr::group_by(results, gen) %>%
204202
dplyr::summarize(num_parents = sum(!is.na(dadID), na.rm = TRUE) + sum(!is.na(momID), na.rm = TRUE))
205203

206204
expect_true(all(filter_parents$num_parents[filter_parents$gen > 1] > 0), info = paste0("Beta option: ", beta))

0 commit comments

Comments
 (0)