Learn R Programming

hyper2 (version 2.0-1)

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)

Arguments

n

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

Value

Returns a numeric vector summing to one

See Also

knownp.test

Examples

Run this code
# NOT RUN {
zipf(icons)
# }

Run the code above in your browser using DataLab