Skip to content

Add ellipsis to tally() and add_tally() #7812

@krlmlr

Description

@krlmlr

The wt, sort and name arguments should be behind an ellipsis, like for count() and similarly for other verbs.

Agent instructions:

Add an ellipsis to the generic and to the method. Ensure that users still can pass unnamed arguments, with a compatibility warning. For this, implement a pattern like

tally <- function(x, ..., wt = NULL ......) {
  # Add compat code that checks ... and converts to regular arguments
  tally_(x, wt = !!wt, sort = sort, name = name)
}
tally_ <- function(.....) {
  UseMethod("tally")
}

Add comprehensive tests for all combinations of named and unnamed args, perhaps with a tester class that has a tally() method that just returns the args.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions