Skip to content

Make sure that dfm_* are robust against empty dfm #1133

Description

@koheiw
nulldfm <- quanteda:::make_null_dfm()

# These look fine
dfm_select(nulldfm)
dfm_select(nulldfm, 'a')
dfm_trim(nulldfm)
dfm_weight(nulldfm)
dfm_sample(nulldfm)
dfm_subset(nulldfm)

# These are not
dfm_lookup(nulldfm, dictionary(list(A = 'a')))
dfm_group(nulldfm)
dfm_compress(nulldfm)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions