force_conformance: Internal function to match a dfm features to a target set

Description Usage Arguments Examples

View source: R/utils.R

Description

Takes a dfm and a set of features, and makes them match the features listed in the set.

Usage

1
force_conformance(x, features, force = TRUE)

Arguments

x

input dfm

features

character; a vector of feature names

force

logical; if TRUE, make the new dfm conform to the vector of features, otherwise return an error message

Examples

1
quanteda.textmodels:::force_conformance(quanteda::data_dfm_lbgexample, c("C", "B", "Z"))

quanteda.textmodels documentation built on April 6, 2021, 9:06 a.m.