Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


JSTORr (version 1.0.20161214)

JSTOR_1word: Plot the frequency of one word over time in a JSTOR DfR dataset

Description

Function to plot changes in the relative frequency of a word over time. The relative frequency is the frequency of the word in a document divided by the total number of words in a document. For use with JSTOR's Data for Research datasets (http://dfr.jstor.org/).

Usage

JSTOR_1word(unpack1grams, oneword, span = 0.5, se = FALSE)

Arguments

unpack1grams
object returned by the function JSTOR_unpack1grams.
oneword
One word, surrounded by standard quote marks, or a vector of words
span
span of the lowess line (controls the degree of smoothing). Default is 0.4
se
logical, show or hide standard error region of smoother line, Default is TRUE.

Value

Returns a ggplot object with publication year on the horizontal axis and log relative frequency on the vertical axis. Each point represents a single document.

Examples

Run this code
## JSTOR_1word(unpack1grams, "diamonds")
## JSTOR_1word(unpack1grams, c("diamonds", "pearls"), span = 0.4, se = FALSE) +
##  scale_y_continuous(trans=log2_trans()) # to diminish the effect of a few extreme values

Run the code above in your browser using DataLab