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

Comments

Projects
None yet
3 participants
@grayskripko
Copy link

grayskripko commented Sep 7, 2018

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

This comment has been minimized.

Copy link
Member

hadley commented Jan 4, 2019

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

@grayskripko

This comment has been minimized.

Copy link
Author

grayskripko commented Jan 7, 2019

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

@khailper

This comment has been minimized.

Copy link

khailper commented Jan 19, 2019

On it.

@hadley hadley closed this in a825a5c Jan 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment