Description Usage Arguments Value Examples

View source: R/corpus_functions.R

Turn a document term matrix, whose rows index documents and
whose columns index terms, into a term co-occurrence matrix. A term co-occurrence
matrix's rows and columns both index terms. See `details`

, below.

1 | ```
Dtm2Tcm(dtm)
``` |

`dtm` |
A document term matrix, generally of class |

Returns a square `dgCMatrix`

whose rows and columns both index
terms. The i, j entries of this matrix represent the count of term j across
documents containing term i. Note that, while square, this matrix is not
symmetric.

1 2 3 | ```
data(nih_sample_dtm)
tcm <- Dtm2Tcm(nih_sample_dtm)
``` |

```
Loading required package: Matrix
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.