number {tm} | R Documentation |
Return the number of rows, columns, dimensions, documents, and terms of a term-document matrix or a document-term matrix.
x |
Either a term-document matrix or a document-term matrix. |
data("crude") tdm <- TermDocumentMatrix(crude)[1:10,1:20] ncol(tdm) nrow(tdm) dim(tdm) nDocs(tdm) nTerms(tdm)