R: tidytext: tidytext hgwells: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs) Created page with "# Ref: https://github.com/dgrtwo/tidy-text-mining/blob/master/01-tidy-text.Rmd library(knitr) opts_chunk$set(message = FALSE, warning = FALSE, cache = TRUE) options(width..." |
Onnowpurbo (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
# Ref: https://github.com/dgrtwo/tidy-text-mining/blob/master/01-tidy-text.Rmd | # Ref: https://github.com/dgrtwo/tidy-text-mining/blob/master/01-tidy-text.Rmd | ||
library(knitr) | library(knitr) | ||
Latest revision as of 03:41, 2 December 2019
# Ref: https://github.com/dgrtwo/tidy-text-mining/blob/master/01-tidy-text.Rmd
library(knitr) opts_chunk$set(message = FALSE, warning = FALSE, cache = TRUE) options(width = 100, dplyr.width = 100) library(ggplot2) theme_set(theme_light())
## Word frequencies library(gutenbergr) hgwells <- gutenberg_download(c(35, 36, 5230, 159)) hgwells
# load("data/hgwells.rda")
tidy_hgwells <- hgwells %>%
unnest_tokens(word, text) %>%
anti_join(stop_words)
# word count tidy_hgwells %>% count(word, sort = TRUE)