zipf | R Documentation |
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
The volleyball dataset might reasonably be assumed to be zipf, but one
can reject this hypothesis at 5\%
, see the examples.
zipf(n)
n |
Integer; if a hyper2 object is supplied this is
interpreted as |
Returns a numeric vector summing to one
Robin K. S. Hankin
knownp.test
zipf(icons)
knownp.test(volleyball,zipf(volleyball))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.