-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
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.
Reactions are currently unavailable