hhi: Herfindahl-Hirschman Index

View source: R/metrics-univariate.R

hhiR Documentation

Herfindahl-Hirschman Index

Description

Herfindahl-Hirschman Index

Usage

hhi(x)

Arguments

x

A vector to obtain the HHI.

Examples


x <- sample(LETTERS[1:10], size = 1000, replace = TRUE, prob = log(1:10))

hhi(x)

plot(table(x), main = hhi_label(hhi(x)))

x <- sample(LETTERS[1:5], size = 1000, replace = TRUE, prob = exp(1:5))

hhi(x)

plot(table(x), main = hhi_label(hhi(x)))

jbkunst/risk3r documentation built on March 19, 2024, 10:49 p.m.