如何在RTextTools中查看create_matrix创建的矩阵的内容?

时间:2017-06-25 11:02:41

标签: r command topicmodels

    library("RTextTools", "topicmodels", "tm")         
    matrix <- create_matrix(data, language="english", removeNumbers=TRUE, stemWords = TRUE, weighting=weightTf)
    > matrix
    #DocumentTermMatrix (documents: 3104, terms: 7699)
    #Non-/sparse entries: 28138/23869558
    #Sparsity           : 100%
    #Maximal term length: 19
    #Weighting          : term frequency (tf)

这是作为输出提供的元数据。我想知道的是,如果有任何命令实际上看到被阻止的词或观察非稀疏的条目。通过使用nrow(矩阵)和ncol(矩阵),我了解了矩阵的大小,但我需要更多的帮助来解构矩阵。我正在使用NYTimes数据集。

0 个答案:

没有答案
相关问题