Wiki

Clone wiki

r-text-tools / plotWordFrequency

Takes a text blob and plots frequency

Digital Approaches to Bibliography and Book History - Rare Book School - University of Virginia - Carl Stahmer and Benjamin Pauley

USAGE:

text <- the text string you want to calculate
exclude <- a comma separated list of words you want to exclude from the count and plot
maxnum <- the maximum number of words to plot
starting from the highest frequency and
counting down

plotWordFrequency(text, exclude, maxnum)

examples:

r> plotWordFrequency(text, "cat,dog", 5)
r> plotWordFrequency(text, "cat,dog")
r> plotWordFrequency(text, "", 5)
r> plotWordFrequency(text)

This work is licensed under a Creative Commons Attribution 4.0 International License.

Updated