Learn R Programming

quanteda (version 0.99.22)

is.dfm: coercion and checking functions for dfm objects

Description

Check for a dfm, or convert a matrix into a dfm.

Usage

is.dfm(x)

as.dfm(x)

Arguments

x

a dfm object

Value

is.dfm returns TRUE if and only if its argument is a dfm.

as.dfm coerces a matrix or data.frame to a dfm. Row names are used for docnames, and column names for featnames, of the resulting dfm.

See Also

as.data.frame.dfm, as.matrix.dfm