# NOT RUN {
# generate vector (of sales)
x <- c(541, 1463, 2445, 3438, 4437, 5401, 6392, 8304, 11904, 22261)
# compute Herfindahl coefficient with parameter 1
Herfindahl(x)
# compute coefficient of Hall/Tiedemann/Rosenbluth
Rosenbluth(x)
# Some more examples
Herfindahl(c(261,29,33,15,39,28,95,5,6,28,69,8,105,38,15))
Herfindahl(c(783,121,112,70,201,153,425,19,37,126,325,51,442,193,41))
# }
Run the code above in your browser using DataLab