Learn R Programming

tm (version 0.3-1)

names: Row, Column, Dim Names, Document IDs, and Terms

Description

Retrieve the row names, column names, dimnames, document IDs, and terms of a term-document matrix or document-term matrix.

Arguments

x
Either a term-document matrix or document-term matrix.

Examples

Run this code
data("crude")
tdm <- TermDocumentMatrix(crude)[1:10,1:20]
rownames(tdm)
colnames(tdm)
dimnames(tdm)
Docs(tdm)
Terms(tdm)

Run the code above in your browser using DataLab