Skip to contents

Hapax introduction ratio tracks the use of unique words as a text grows.

Usage

get_hir(x)

Arguments

x

A vector, such as a column of character strings

Value

A vector of ratios

See also

Examples

c("cat", "dog", "dog", "bat", "dog") |>
  get_hir()
#> [1] 1.0000000 0.5000000 0.3333333 0.5000000 0.4000000