Skip to content

docvars <- calls deprecated as.data.frame.dfm when using a dfm #1417

@bbo2adwuff

Description

@bbo2adwuff

Describe the bug

data.frame() in https://github.com/quanteda/quanteda/blob/master/R/docvars.R#L151 leads to following warning:

Warning message:
'as.data.frame.dfm' is deprecated.
Use 'convert(x, to "data.frame")' instead.
See help("Deprecated") 

Reproducible code

library(quanteda)
corpus.a <- corpus(data_char_ukimmig2010)
docvars(corpus.a) <- dfm_lookup(dfm(corpus.a), dictionary(list(keyword = 'the')))

System information

quanteda_1.3.4

Additional info

Oh and I just see that there is a missing = in the warning message. It should be to = "data.frame".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions