Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

zipf.fnc

Zipf's rank frequency distribution


Description

This function calculates Zipf's rank-frequency distribution for a text vector, and optionally produces the rank-frequency plot.

Usage

zipf.fnc(text, plot = FALSE)

Arguments

text

A character vector containing a text.

plot

Logical, if TRUE, a rank-frequency plot is shown on the graphics device.

Value

A data frame with variables

frequency

Word Frequencies, ordered from large to small.

freqOfFreq

Frequencies of word frequencies.

rank

Zipf rank.

Author(s)

R. H. Baayen

References

Zipf, G. K. (1935) The Psycho-Biology of Language, Boston: Houghton Mifflin.

Zipf, G. K. (1949) Human Behavior and the Principle of the Least Effort. An Introduction to Human Ecology, New York: Hafner.

Baayen, R. H. (2001) Word Frequency Distributions, Dordrecht: Kluwer.

See Also

See also growth.fnc.

Examples

## Not run: 
data(alice)
alice.zipf = zipf.fnc(alice, plot = TRUE) 
head(alice.zipf)

## End(Not run)

languageR

Analyzing Linguistic Data: A Practical Introduction to Statistics

v1.5.0
GPL (>= 2)
Authors
R. H. Baayen <harald.baayen@uni-tuebingen.de>, Elnaz Shafaei-Bajestan <elnaz.shafaei-bajestan@uni-tuebingen.de>
Initial release
2019-01-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.