zipf {hyper2} | R Documentation |
Zipf's law
Description
A very short function that reproduces Zipf's law: a harmonic rank-probability distribution, formally
p(i)=\frac{i^{-1}}{\sum_{i=1}^{N} i^{-1}},\qquad i=1,\ldots,N
Usage
zipf(n)
Arguments
n |
Integer; if a hyper2 object is supplied this is
interpreted as |
Value
Returns a numeric vector summing to one
Author(s)
Robin K. S. Hankin
See Also
Examples
zipf(icons)
[Package hyper2 version 3.1-0 Index]