Closed nathaneastwood closed 3 years ago
Example of failing tests:
df <- data.frame( f1 = factor("a", levels = c("a", "b", "c")), f2 = factor("d", levels = c("d", "e", "f", "g")), x = 42 ) res <- df %>% group_by(f1, f2, .drop = TRUE) expect_equal(n_groups(res), 1L, info = "summarise maintains the .drop attribute") res2 <- summarise(res, x = sum(x)) expect_equal(n_groups(res2), 1L, info = "summarise maintains the .drop attribute") expect_true(group_by_drop_default(res2), info = "summarise maintains the .drop attribute")
Example of failing tests: