(Originally reported at #4051 (comment).)
Details
``` r
library(dplyr, warn.conflicts = FALSE)
x <- as_tibble(iris)
g <- group_by(x, Species)
class(g) <- c("myclass", class(g))
x %>%
add_tally() %>%
class()
#> [1] "tbl_df" "tbl" "data.frame"
x %>%
add_count() %>%
class()
#> [1] "tbl_df" "tbl" "data.frame"
<sup>Created on 2019-01-07 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)</sup>
</details>
(Originally reported at #4051 (comment).)
Details
``` r library(dplyr, warn.conflicts = FALSE)x <- as_tibble(iris)
g <- group_by(x, Species)
class(g) <- c("myclass", class(g))
x %>%
add_tally() %>%
class()
#> [1] "tbl_df" "tbl" "data.frame"
x %>%
add_count() %>%
class()
#> [1] "tbl_df" "tbl" "data.frame"