We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe something like this:
count <- function(tbl, ..., wt = NULL) { vars <- dots(...) wt <- substitute(wt) grouped <- regroup(tbl, vars) if (is.null(wt)) { summarise(grouped, n = n()) } else { call <- substitute(summarise(grouped, n = sum(wt)), list(wt = wt)) eval(call) } }
The text was updated successfully, but these errors were encountered:
Should be something like this:
count <- function(tbl, ..., wt = NULL, sort = FALSE) { vars <- lazyeval::dots(...) wt <- substitute(wt) count_(tbl, vars, wt, sort = sort) } count_ <- function(tbl, ..., wt = NULL, sort = FALSE) { grouped <- group_by_(tbl, vars) tally_(grouped, wt = wt, sort = sort) }
Sorry, something went wrong.
dc92c24
Implement count. Closes tidyverse#358
9fbe99d
hadley
No branches or pull requests
Maybe something like this:
The text was updated successfully, but these errors were encountered: