cbind.dfm
or
rbind.dfm
operation.
compress(x, ...)
"compress"(x, margin = c("both", "documents", "features"), ...)
"documents"
, "features"
, or "both"
(default)mat <- rbind(dfm(c("b A A", "C C a b B"), toLower = FALSE, verbose = FALSE),
dfm("A C C C C C", toLower = FALSE, verbose = FALSE))
colnames(mat) <- toLower(features(mat))
mat
compress(mat, margin = "documents")
compress(mat, margin = "features")
compress(mat)
# no effect if no compression needed
compress(dfm(inaugTexts, verbose = FALSE))
Run the code above in your browser using DataLab