powered by
dfm_sort(x, decreasing = TRUE, margin = c("features", "documents", "both"))
dfm
features
documents
both
dtm <- dfm(data_corpus_inaugural) dtm[1:10, 1:5] dfm_sort(dtm)[1:10, 1:5] dfm_sort(dtm, decreasing = FALSE, "both")[1:10, 1:5]
Run the code above in your browser using DataLab