R: Compute entropies of documents or features

textstat_entropy {quanteda.textstats} | R Documentation

## Compute entropies of documents or features

### Description

Compute entropies of documents or features

### Usage

    textstat_entropy(x, margin = c("documents", "features"), base = 2)

### Arguments

`x` | a `dfm`
`margin` | character indicating for which margin to compute entropy
`base` | base for logarithm function

### Value

a data.frame of entropies for the given document or feature

### Examples

    library("quanteda")
    textstat_entropy(data_dfm_lbgexample)
    textstat_entropy(data_dfm_lbgexample, "features")

[Package quanteda.textstats version 0.94.1 Index]