Learn R Programming

hyper2 (version 3.0-0)

zipf: Zipf's law

Description

A very short function that reproduces Zipf's law: a harmonic rank-probability distribution, formally

p(i)=i^-1_i=1^N i^-1, i=1,...,Nomitted

Usage

zipf(n)

Value

Returns a numeric vector summing to one

Arguments

n

Integer; if a hyper2 object is supplied this is interpreted as size(n)

Author

Robin K. S. Hankin

See Also

knownp.test

Examples

Run this code

zipf(icons)

Run the code above in your browser using DataLab