Sorts a dfm by frequency of total features, total features in documents, or both
# S3 method for dfm
sort(x, decreasing = TRUE, margin = c("features", "docs",
"both"), ...)
Document-feature matrix created by dfm
TRUE (default) if sort will be in descending order, otherwise sort in increasing order
which margin to sort on features
to sort by frequency of
features, docs
to sort by total feature counts in documents, and
both
to sort by both
additional arguments passed to base method sort.int
A sorted dfm matrix object
dfm_sort