Skip to content

Should add_count() be generic? #5837

Closed
Closed

Description

@mgirlich

add_count() is not generic in contrast to count(). As add_count() uses mostly exported dplyr verbs it almost works correctly in dbplyr and dtplyr. The issue is that the resulting table is grouped.

There are basically two solutions to this:

  1. make add_count() generic or
  2. Remove the check for is.data.frame(x) in add_count():
# last lines of `add_count()`
if (is.data.frame(x)) {
    out <- dplyr_reconstruct(out, x)
}
out

Then it would only be necessary to implement dplyr_reconstruct() for tbl_lazy in dbplyr and dtplyr_step in dtplyr

Activity

  1. added a commit that references this issue on Apr 9, 2021
    ec2c61e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions