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

docid returns a factor not a character #2072

Open
contefranz opened this issue Mar 3, 2021 · 1 comment
Open

docid returns a factor not a character #2072

contefranz opened this issue Mar 3, 2021 · 1 comment

Comments

@contefranz
Copy link

contefranz commented Mar 3, 2021

I noticed that the documentation of docid() says that the returned value is a character vector. That's a factor really. I couldn't do some operations and now I understand why.

Can you fix the documentation?

library(quanteda)
#> Package version: 2.1.2
#> Parallel computing: 2 of 16 threads used.
#> See https://quanteda.io for tutorials and examples.
#> 
#> Attaching package: 'quanteda'
#> The following object is masked from 'package:utils':
#> 
#>     View

doc_id <- docid(data_corpus_inaugural)
class(doc_id)
#> [1] "factor"

Created on 2021-03-03 by the reprex package (v1.0.0)

@koheiw
Copy link
Collaborator

koheiw commented Mar 3, 2021

Good eyes. docid is factor. We hugely welcome users' participation via pull requests!

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

2 participants