Skip to content

Commit

Permalink
additional #1185 test for rowwise
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed May 3, 2018
1 parent 5870af0 commit fab2fb8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-group-indices.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ test_that("group_indices() can be used inside mutate (#1185)", {
pull(mutate(df, g = group_indices())),
rep(0L, 6)
)

df <- data_frame(v1 = c(3, 3, 2, 2, 3, 1), v2 = 1:6)
expect_identical(
pull(mutate(rowwise(df), g = group_indices())),
1:6
)
})

0 comments on commit fab2fb8

Please sign in to comment.