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

dfm() Rd still includes ngrams argument #1990

Closed
kbenoit opened this issue Aug 17, 2020 · 0 comments
Closed

dfm() Rd still includes ngrams argument #1990

kbenoit opened this issue Aug 17, 2020 · 0 comments

Comments

@kbenoit
Copy link
Collaborator

kbenoit commented Aug 17, 2020

We need to remove the ngrams argument from the examples for dfm(). They're not executing and producing warnings instead.

featnames(dfm(corp, ngrams = 2, select = stopwords("english"), remove_punct = TRUE))
#> Warning: ngrams argument is not used.
#> [1] "the"  "over" "with" "from" "a"    "in"   "his" 

The error is from

quanteda/R/dfm.R

Lines 84 to 85 in e16b4ba

#' featnames(dfm(corp, ngrams = 2, select = stopwords("english"), remove_punct = TRUE))
#' featnames(dfm(corp, ngrams = 1:2, select = stopwords("english"), remove_punct = TRUE))

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

No branches or pull requests

1 participant