Skip to content
New issue

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

add_totals_row() fails on grouped data_frame #97

Closed
sfirke opened this issue Mar 14, 2017 · 1 comment
Closed

add_totals_row() fails on grouped data_frame #97

sfirke opened this issue Mar 14, 2017 · 1 comment

Comments

@sfirke
Copy link
Owner

sfirke commented Mar 14, 2017

When called on a grouped data.frame, this produces an error, because of the helper function check_all_cols_after_first_are_numeric() and its select(-1). You can't select out a grouping variable.

mtcars %>%
  group_by(mpg) %>%
  add_totals_row()

Note that I have a branch that needs tests, where add_totals_row works with non-numeric columns and thus eliminates the need for check_all_cols_after_first... - maybe that'll solve this too.

@sfirke
Copy link
Owner Author

sfirke commented Mar 17, 2017

Yeah, fix this with #57 - add tests and do it on that branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant