Skip to content

Commit dc6f889

Browse files
committed
namespace count instead of loading tidyr with library()
1 parent 40ec24f commit dc6f889

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/testthat/test_grouped_glm.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
library(tidyr)
2-
31
test_that('correct results for glm_grouped()', {
42
ucb_weighted <- as.data.frame(UCBAdmissions)
53
ucb_weighted$Freq <- as.integer(ucb_weighted$Freq)
64

7-
ucb_long <- uncount(ucb_weighted, Freq)
5+
ucb_long <- tidyr::uncount(ucb_weighted, Freq)
86

97
ungrouped <- glm(Admit ~ Gender + Dept, data = ucb_long, family = binomial)
108

119
expect_error(
1210
grouped <- glm_grouped(Admit ~ Gender + Dept, data = ucb_weighted, weights = ucb_weighted$Freq),
1311
regexp = NA
1412
)
15-
expect_equal(grouped$df.null, 11)
1613

14+
expect_equal(grouped$df.null, 11)
1715
})

0 commit comments

Comments
 (0)