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

fct_count(..., prop_OR_relative_OR_normalize_OR_freq= T) #146

Closed
grayskripko opened this issue Sep 7, 2018 · 3 comments
Closed

fct_count(..., prop_OR_relative_OR_normalize_OR_freq= T) #146

grayskripko opened this issue Sep 7, 2018 · 3 comments
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@grayskripko
Copy link

I wasn't able to find a good short approach to do

c("a", "a", "b") %>% table() %>% prop.table()

using forcats package. I think it's pretty handy to use a special argument for this purpose as in sklearn value_counts

@hadley
Copy link
Member

hadley commented Jan 4, 2019

Maybe c("a" ,"a", "b") %>% fct_count(prop = TRUE)?

@hadley hadley added feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day labels Jan 4, 2019
@grayskripko
Copy link
Author

should be OK and more R-thonic :) than normalize

@khailper
Copy link

On it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

No branches or pull requests

3 participants