Description Usage Arguments Value Author(s) See Also Examples

term frequency, inverse document frequency

1 |

`x` |
A |

`normalize` |
Whether to normalize term frequency by document totals. |

A matrix of the same type as `x`

, with values replaced by the tf-idf

* f_{ij} * \log[n/(d_j+1)], *

where *f_{ij}* is *x_{ij}/m_i* or *x_{ij}*, depending on `normalize`

,
and *d_j* is the number of documents containing token *j*.

Matt Taddy [email protected]

pls, we8there

1 2 3 4 5 6 | ```
data(we8there)
## 20 high-variance tf-idf terms
colnames(we8thereCounts)[
order(-sdev(tfidf(we8thereCounts)))[1:20]]
``` |

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.