Learn R Programming

languageR (version 1.5.0)

spectrum.fnc: Frequency spectrum from text vector

Description

This function creates a frequency spectrum for a text in character vector form.

Usage

spectrum.fnc(text)

Arguments

text

A character vector containing the words of a text.

Value

A data frame with as column variables

frequency

Word frequencies.

freqOfFreq

The frequencies of the word frequencies.

References

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

See Also

See Also the zipfR package.

Examples

Run this code
# NOT RUN {
data(alice)
alice.spectrum = spectrum.fnc(alice)
head(alice.spectrum)
tail(alice.spectrum)
# }

Run the code above in your browser using DataLab