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

Consider deprecating convenience options from dfm() #1602

Closed
kbenoit opened this issue Feb 10, 2019 · 0 comments · Fixed by #2073
Closed

Consider deprecating convenience options from dfm() #1602

kbenoit opened this issue Feb 10, 2019 · 0 comments · Fixed by #2073

Comments

@kbenoit
Copy link
Collaborator

kbenoit commented Feb 10, 2019

Since we are on the issue of style, we could consider encouraging stepped dfm() processing options, versus using the dfm() convenience options. We would probably not want to remove or even deprecate (with warnings using .Deprecate()) them because so many people use them, but it seems better to use

dfm(toks) %>%
    dfm_remove(stopwords("en")) %>%
    dfm_group(by = "party")

than

dfm(toks, remove = stopwords("en"), groups = "party")

etc.

For educational materials and examples, at least, we could stick to the chained steps for clarity.

Just a thought, not essential.

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

Successfully merging a pull request may close this issue.

1 participant