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

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.

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