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 dplyr::summarize method? #57

Closed
patrickbarks opened this issue Feb 11, 2019 · 0 comments
Closed

Add dplyr::summarize method? #57

patrickbarks opened this issue Feb 11, 2019 · 0 comments

Comments

@patrickbarks
Copy link
Collaborator

I didn't initially add a method for summarize alongside the other tidyverse functions because summarize won't ever return a valid CompadreDB object. But now I keep forgetting that I have to use CompadreData() or as_tibble() before calling summarize().

Compadre %>% 
  CompadreData() %>%
  group_by(OrganismType, Continent) %>% 
  summarize(n = n())

In hindsight, I don't think the 'must return a CompadreDB object' requirement was necessary, and a summarize method that returns a regular tibble would be rather convenient. E.g.

Compadre %>% 
  group_by(OrganismType, Continent) %>% 
  summarize(n = n())

Everyone ok with this?

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