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

Description Usage Arguments Value Examples

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

1
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

1
2
3
## 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

benmarwick/JSTORr documentation built on May 12, 2019, 12:59 p.m.