Description Usage Arguments Value Examples
word_frequency
provides, for a vector of words,
the number of appearances each word made per year in the source texts Wordnik
uses.
1 2 | word_frequency(key, words, use_canonical = FALSE, start_year = 1800,
end_year = 2012, ...)
|
key |
a Wordnik API key. These can be obtained at the Wordnik developer portal. |
words |
a vector of words. |
use_canonical |
whether to use the stemmed, canonical form of the word
(i.e. 'cat', for 'cats') instead of the actual |
start_year |
the earliest year to get frequencies for. 1800 (the earliest accepted value) by default. |
end_year |
the latest year to get frequencies for. 2012 (the latest accepted value) by default. |
... |
further arguments to pass to httr's GET. |
a data.frame of 3 columns; word
, year
and frequency
.
1 2 3 4 | ## Not run:
cats_versus_dogs <- word_frequency(key = "notarealkey", words = c("cat", "dog"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.