Emotion Analysis

This document contains the complete code for Emotion Analysis of Jane Austen’s book Emma.

if("tidytext" %in% rownames(installed.packages()) == FALSE) 
{install.packages("tidytext", dependencies=TRUE)}
library(tidytext)

if("textdata" %in% rownames(installed.packages()) == FALSE) 
{install.packages("textdata", dependencies=TRUE)}
library(textdata)

if("janeaustenr" %in% rownames(installed.packages()) == FALSE) 
{install.packages("janeaustenr", dependencies=TRUE)}
library(janeaustenr)

if("stringr" %in% rownames(installed.packages()) == FALSE) 
{install.packages("stringr", dependencies=TRUE)}
library(stringr)

if("dplyr" %in% rownames(installed.packages()) == FALSE) 
{install.packages("dplyr", dependencies=TRUE)}
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
if("tidyr" %in% rownames(installed.packages()) == FALSE) 
{install.packages("tidyr", dependencies=TRUE)}
library(tidyr)

if("ggplot2" %in% rownames(installed.packages()) == FALSE) 
{install.packages("ggplot2", dependencies=TRUE)}
library(ggplot2)

if("ggthemes" %in% rownames(installed.packages()) == FALSE) 
{install.packages("ggthemes", dependencies=TRUE)}
library(ggthemes)

if("reshape2" %in% rownames(installed.packages()) == FALSE) 
{install.packages("reshape2", dependencies=TRUE)}
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
if("wordcloud" %in% rownames(installed.packages()) == FALSE) 
{install.packages("wordcloud", dependencies=TRUE)}
library(wordcloud)
## Loading required package: RColorBrewer
if("igraph" %in% rownames(installed.packages()) == FALSE)
{install.packages("igraph")}
library(igraph)
## 
## Attaching package: 'igraph'
## The following object is masked from 'package:tidyr':
## 
##     crossing
## The following objects are masked from 'package:dplyr':
## 
##     as_data_frame, groups, union
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## The following object is masked from 'package:base':
## 
##     union
if("ggraph" %in% rownames(installed.packages()) == FALSE)
{install.packages("ggraph")}
library(ggraph)

tidy_data <- austen_books() %>%
  group_by(book) %>%
  mutate(linenumber = row_number(),
         chapter = cumsum(str_detect(text, regex("^chapter [\\divxlc]", 
                                                 ignore_case = TRUE)))) %>%
  ungroup() %>%
  unnest_tokens(word, text) %>%
  anti_join(stop_words)
## Joining, by = "word"
tidy_data
## # A tibble: 217,609 x 4
##    book                linenumber chapter word       
##    <fct>                    <int>   <int> <chr>      
##  1 Sense & Sensibility          1       0 sense      
##  2 Sense & Sensibility          1       0 sensibility
##  3 Sense & Sensibility          3       0 jane       
##  4 Sense & Sensibility          3       0 austen     
##  5 Sense & Sensibility          5       0 1811       
##  6 Sense & Sensibility         10       1 chapter    
##  7 Sense & Sensibility         10       1 1          
##  8 Sense & Sensibility         13       1 family     
##  9 Sense & Sensibility         13       1 dashwood   
## 10 Sense & Sensibility         13       1 settled    
## # … with 217,599 more rows
v_book <- "Emma"
v_lexicon <- "nrc"

positive_emotions <- c("positive","joy","anticipation","surprise", "trust")
negative_emotions <- c("negative","anger","disgust","fear", "sadness")

positive_sentiment <- get_sentiments(v_lexicon) %>%
  filter(sentiment %in% positive_emotions)

#################################
# MOST COMMON WORDS IN THE BOOK
#################################
tidy_data %>%
  filter(book == v_book) %>%
  semi_join(positive_sentiment) %>%
  count(word, sort = TRUE)
## Joining, by = "word"
## # A tibble: 1,114 x 2
##    word       n
##    <chr>  <int>
##  1 time     279
##  2 dear     241
##  3 frank    200
##  4 father   168
##  5 friend   166
##  6 hope     143
##  7 happy    125
##  8 love     117
##  9 letter   109
## 10 doubt     98
## # … with 1,104 more rows
tidy_data %>%
  filter(book == v_book) %>%
  count(word, sort = TRUE) %>%
  filter(n > 70) %>%
  mutate(word = reorder(word, n)) %>%
  ggplot(aes(word, n)) +
  geom_col() +
  xlab(NULL) +
  coord_flip() + ggtitle(paste("The Most Common Words in the Novel - ", v_book))

#################################
# WORD CONTRIBUTION TO SENTIMENTS
#################################
book_sentiment <- tidy_data %>%
  inner_join(get_sentiments(v_lexicon)) %>%
  count(book = v_book, word, 
        index = linenumber %/% 80, sentiment) %>%
  mutate(original_n = n) %>%
  mutate(positive_negative = ifelse(sentiment %in% c('positive','joy','surprise','trust','anticipation'), 'positive', 'negative')) %>%
  mutate(original_sentiment = sentiment) %>%
  spread(sentiment, n, fill = 0) %>%
  mutate(sentiment = (positive+joy+surprise+trust+anticipation) - (negative+anger+disgust+sadness+fear)) %>%
  ungroup()
## Joining, by = "word"
book_sentiment
## # A tibble: 110,044 x 17
##    book  word  index original_n positive_negati… original_sentim… anger
##    <chr> <chr> <dbl>      <int> <chr>            <chr>            <dbl>
##  1 Emma  aban…    63          1 negative         anger                1
##  2 Emma  aban…    63          1 negative         fear                 0
##  3 Emma  aban…    63          1 negative         negative             0
##  4 Emma  aban…    63          1 negative         sadness              0
##  5 Emma  abhor    17          1 negative         anger                1
##  6 Emma  abhor    17          1 negative         disgust              0
##  7 Emma  abhor    17          1 negative         fear                 0
##  8 Emma  abhor    17          1 negative         negative             0
##  9 Emma  abhor    51          1 negative         anger                1
## 10 Emma  abhor    51          1 negative         disgust              0
## # … with 110,034 more rows, and 10 more variables: anticipation <dbl>,
## #   disgust <dbl>, fear <dbl>, joy <dbl>, negative <dbl>, positive <dbl>,
## #   sadness <dbl>, surprise <dbl>, trust <dbl>, sentiment <dbl>
book_sentiment %>%
  filter(original_n > 5) %>%
  group_by(original_sentiment) %>%
  top_n(5) %>%
  ungroup() %>%
  mutate(word = reorder(word, original_n)) %>%
  ggplot(aes(word, original_n, fill = original_sentiment)) +
  geom_col(show.legend = FALSE) +
  facet_wrap(~original_sentiment, scales = "free_y") +
  labs(y = "Words Contribution to Individual Sentiments",
       x = NULL) +
  coord_flip()
## Selecting by sentiment

################################
# POSITIVE & NEGATIVE SENTIMENTS 
################################
book_nrc <- book_sentiment %>%
  mutate(Pos_Neg = ifelse(original_sentiment %in% c("positive","joy","anticipation","trust","surprise"), "positive", "negative")) %>%
  mutate(original_n = ifelse(Pos_Neg == "negative", -original_n, original_n))

ggplot(data = book_nrc, aes(x = index, y = original_n, fill = Pos_Neg)) +
  geom_bar(stat = 'identity', position = position_dodge()) + 
  theme_minimal() +
  ylab("Sentiment") + 
  ggtitle(paste("Positive and Negative Sentiment in Novel - ", v_book)) +
  scale_color_manual(values = c("red", "dark green")) +
  scale_fill_manual(values = c("red", "dark green"))

####################
# SENTIMENTS
####################
emotions <- book_nrc %>% 
  select(index, anger, anticipation, disgust, fear, joy, 
                sadness, surprise, trust) %>% 
  melt(id = "index")
names(emotions) <- c("linenumber", "sentiment", "value")
emotions_group <- group_by(emotions, sentiment)
by_emotions <- summarise(emotions_group, values=sum(value))
ggplot(aes(reorder(x=sentiment, values), y=values, fill=sentiment), data = by_emotions) +
  geom_bar(stat = 'identity') + 
  ggtitle(paste('Sentiment in Novel - ', v_book)) +
  coord_flip() + 
  theme(legend.position="none")

####################
# SENTIMENT SCORE
####################
word_count <- tidy_data %>%
  filter(book == v_book) %>%
  inner_join(get_sentiments(v_lexicon)) %>%
  count(word, sentiment, sort = TRUE)
## Joining, by = "word"
head(word_count)
## # A tibble: 6 x 3
##   word   sentiment        n
##   <chr>  <chr>        <int>
## 1 time   anticipation   279
## 2 dear   positive       241
## 3 frank  positive       200
## 4 frank  trust          200
## 5 father trust          168
## 6 friend joy            166
word_count %>%
  filter(n > 25) %>%
  mutate(n = ifelse(sentiment %in% negative_emotions, -n, n)) %>%
  mutate(word = reorder(word, n)) %>%
  ggplot(aes(word, n, fill = sentiment))+
  geom_col() +
  coord_flip() +
  labs(y = "Sentiment Score")

####################
# WORD CLOUD
####################
tidy_data %>%
  filter(book == v_book) %>%
  inner_join(get_sentiments(v_lexicon)) %>%
  count(word, sentiment, sort = TRUE) %>%
  acast(word ~ sentiment, value.var = "n", fill = 0) %>%
  comparison.cloud(
    colors = c("red","dark green","blue","grey","magenta","brown","orange","mediumaquamarine","navy"),
                   max.words = 500)
## Joining, by = "word"
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : doubt could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : bad could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : creature could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : feeling could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fortune could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ashamed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : evil could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : judgment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : impossible could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ready could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : cheerful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : happiness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : delighted could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : compliment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : curiosity could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : guess could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : immediately could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : difficulty could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dare could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : satisfied could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : angry could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disappointment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disappointed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : danger could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : daughter could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : pleased could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : sweet could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : account could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : assure could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : late could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : affection could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unhappy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : expect could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : regret could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dislike could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : expected could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : eager could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : suffering could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dreadful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : music could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : agitation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : alarm could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : usual could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : boy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : laugh could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : agreeable could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : distress could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lose could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : believed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lost could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : scarcely could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : catch could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unpleasant could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : respect could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fault could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : morrow could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fancy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : confusion could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : delightful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : wretched could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : objection could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : smiling could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : receiving could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : indifference could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : engaged could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : uneasy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : wonderful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : convinced could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : difficulties could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : inferior could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : beauty could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : gratitude could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : forgotten could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : humble could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : praise could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : marriage could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : colonel could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : leisure could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : mistake could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : perfect could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : truth could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : frightened could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : steady could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : misery could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : miserable could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : mortification could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : mistress could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ignorant could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : elegant could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : companion could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : manners could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : luck could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : concerned could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : confined could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : mad could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : agitated could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : beautiful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : friendship could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : independence could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : musical could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lucky could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : concealment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : vulgar could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : absence could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : shame could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : quickness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : admiration could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : reproach could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : resentment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : compassion could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : perfection could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lovely could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : larger could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : indignation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : understanding could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : melancholy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : attempt could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : invitation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : cross could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dance could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : troublesome could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : youth could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : promise could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : safe could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : liberty could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : gentleman could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : abominable could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : blunder could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : charade could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : money could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : intelligence could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : delight could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disposed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : death could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : necessity could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : amused could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : happily could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : nonsense could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : precious could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : sore could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dreadfully could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : displeased could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : opportunity could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : forced could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dirty could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : displeasure could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unworthy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : absent could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fall could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fell could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : interrupted could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : refused could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : laughing could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : journey could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : anger could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : complaint could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : deny could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : approbation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disparity could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dependence could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : amiable could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : received could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : secret could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lord could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ceremony could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : nervous could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : amusement could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : uneasiness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : watch could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : distressing could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : blame could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : provoking could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : intended could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : coldness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unequal could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : horror could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : agreed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : conceal could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : falling could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : exclaim could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : goodness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : charming could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : recommend could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : respectable could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unjust could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : friendly could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : awkwardness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : hesitation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : refuse could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : astonishment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : worth could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : error could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : shock could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : expectation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : excellence could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : parade could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : income could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : vanity could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : attack could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : force could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : expecting could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : possibility could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dread could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : prepared could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disturbed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : alarming could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : rational could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : worthy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : suspense could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ridiculous could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : selfish could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ungrateful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : elegance could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : tender could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : blessings could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : entertainment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : excited could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : rejoice could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dangerous could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : public could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : dark could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : abundance could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : mouth could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : riddle could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : suddenly could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lament could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : advantage could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : clever could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fortunate could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : spirit could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : happen could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : probability could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : grave could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : depressed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : horrible could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : possession could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : share could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : completely could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : knowing could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : knowledge could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : blindness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unfortunate could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unwell could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : mystery could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : difficult could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : escaped could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ground could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : assured could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : importance could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : inquiry could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : suffer could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : extraordinary could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : standing could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : misconduct could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : silly could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lace could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : apprehension could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : madness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : penetration could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : impatient could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : exciting could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : losing could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : offended could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : cutting could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : despair could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disgust could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : jealousy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : painful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : accomplished could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : garden could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : advice could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : persuade could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : humiliation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : sickly could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : powerful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : nay could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : angel could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : succeed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : betray could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : join could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : birth could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : bride could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disdain could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : thoughtless could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : merit could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : honest could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : imprudent could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : daily could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : forming could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : remove could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : cautious could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : embarrassment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : measles could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : repent could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : confess could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : success could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : continue could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : patience could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : penance could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : consciousness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : encouragement could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : information could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : argument could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : disagree could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : injustice could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : punishment could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : blessing could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : peace could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : irritation could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : remiss could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unfair could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : assist could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : strength could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : farm could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : bath could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ease could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : improvement could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : resources could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : misfortune could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : exquisite could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : teach could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : ribbon could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : pretend could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : opposed could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : complain could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : hate could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unlucky could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : sympathy could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : offer could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : airs could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : donkey could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : fool could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : wickedness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : alertness could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : black could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : grief could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : lower could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : regretted could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : sorrowful could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unwelcome could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : cheer could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : generosity could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : inviting could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : avoiding could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : plea could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : liberal could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : sentence could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : equally could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : tree could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : advance could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : inequality could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : slave could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : prejudiced could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : unnatural could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : excluded could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : guilt could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : foolish could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : amuse could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : grow could not be fit on page. It will not be plotted.
## Warning in comparison.cloud(., colors = c("red", "dark green", "blue",
## "grey", : intimate could not be fit on page. It will not be plotted.

####################
# ANALYSING BIGRAMS
####################
book_bigrams <- austen_books() %>%
  group_by(book) %>%
  filter(book == v_book) %>%
  unnest_tokens(bigram, text, token = "ngrams", n = 2)
book_bigrams
## # A tibble: 160,995 x 2
## # Groups:   book [1]
##    book  bigram            
##    <fct> <chr>             
##  1 Emma  emma by           
##  2 Emma  by jane           
##  3 Emma  jane austen       
##  4 Emma  austen volume     
##  5 Emma  volume i          
##  6 Emma  i chapter         
##  7 Emma  chapter i         
##  8 Emma  i emma            
##  9 Emma  emma woodhouse    
## 10 Emma  woodhouse handsome
## # … with 160,985 more rows
bigrams_separated <- book_bigrams %>%
  separate(bigram, c("word1", "word2"), sep = " ")
bigrams_filtered <- bigrams_separated %>%
  filter(!word1 %in% stop_words$word) %>%
  filter(!word2 %in% stop_words$word)
bigram_counts <- bigrams_filtered %>% 
  count(word1, word2, sort = TRUE)
bigram_counts
## # A tibble: 7,487 x 4
## # Groups:   book [1]
##    book  word1 word2         n
##    <fct> <chr> <chr>     <int>
##  1 Emma  miss  woodhouse   162
##  2 Emma  frank churchill   132
##  3 Emma  miss  fairfax     109
##  4 Emma  miss  bates       103
##  5 Emma  jane  fairfax      96
##  6 Emma  john  knightley    56
##  7 Emma  miss  smith        51
##  8 Emma  miss  taylor       40
##  9 Emma  dear  emma         31
## 10 Emma  maple grove        31
## # … with 7,477 more rows
bigrams_united <- bigrams_filtered %>%
  unite(bigram, word1, word2, sep = " ")
bigrams_united
## # A tibble: 9,524 x 2
## # Groups:   book [6]
##    book  bigram                
##    <fct> <chr>                 
##  1 Emma  jane austen           
##  2 Emma  austen volume         
##  3 Emma  emma woodhouse        
##  4 Emma  woodhouse handsome    
##  5 Emma  handsome clever       
##  6 Emma  comfortable home      
##  7 Emma  happy disposition     
##  8 Emma  affectionate indulgent
##  9 Emma  indulgent father      
## 10 Emma  sister's marriage     
## # … with 9,514 more rows
bigram_tf_idf <- bigrams_united %>%
  count(bigram)
bigram_tf_idf <- bigram_tf_idf %>% 
  filter(n > 10)
ggplot(aes(x = reorder(bigram, n), y=n), data=bigram_tf_idf) + 
  geom_bar(stat = 'identity') + 
  ggtitle(paste("The Most Common Bigrams in Novel -", v_book)) + 
  coord_flip()

bigram_graph_dataframe <- bigram_counts[ , !(names(bigram_counts) %in% c("book"))]
bigram_graph <- bigram_graph_dataframe %>%
  filter(n > 5) %>%
  graph_from_data_frame()
bigram_graph
## IGRAPH cc96487 DN-- 68 55 -- 
## + attr: name (v/c), n (e/n)
## + edges from cc96487 (vertex names):
##  [1] miss   ->woodhouse   frank  ->churchill   miss   ->fairfax    
##  [4] miss   ->bates       jane   ->fairfax     john   ->knightley  
##  [7] miss   ->smith       miss   ->taylor      dear   ->emma       
## [10] maple  ->grove       cried  ->emma        harriet->smith      
## [13] robert ->martin      dear   ->miss        colonel->campbell   
## [16] frank  ->churchill's box    ->hill        miss   ->fairfax's  
## [19] miss   ->hawkins     replied->emma        dear   ->jane       
## [22] jane   ->fairfax's   poor   ->miss        poor   ->harriet    
## + ... omitted several edges
set.seed(2019)
ggraph(bigram_graph, layout = "kk") +
  geom_edge_link() +
  geom_node_point(color = "darkslategray4", size = 3) +
  geom_node_text(aes(label = name), vjust = 1.8) +
  ggtitle(paste("Most Common Bigrams in the Novel - ",v_book))

####################
# ANALYSING TRIGRAMS
####################
book_trigrams <- austen_books() %>%
  group_by(book) %>%
  filter(book == v_book) %>%
  unnest_tokens(trigram, text, token = "ngrams", n = 3)
book_trigrams
## # A tibble: 160,994 x 2
## # Groups:   book [1]
##    book  trigram                  
##    <fct> <chr>                    
##  1 Emma  emma by jane             
##  2 Emma  by jane austen           
##  3 Emma  jane austen volume       
##  4 Emma  austen volume i          
##  5 Emma  volume i chapter         
##  6 Emma  i chapter i              
##  7 Emma  chapter i emma           
##  8 Emma  i emma woodhouse         
##  9 Emma  emma woodhouse handsome  
## 10 Emma  woodhouse handsome clever
## # … with 160,984 more rows
trigrams_separated <- book_trigrams %>%
  separate(trigram, c("word1", "word2", "word3"), sep = " ")
trigrams_filtered <- trigrams_separated %>%
  filter(!word1 %in% stop_words$word) %>%
  filter(!word2 %in% stop_words$word) %>%
  filter(!word3 %in% stop_words$word)
trigram_counts <- trigrams_filtered %>% 
  count(word1, word2, word3, sort = TRUE)
trigram_counts
## # A tibble: 1,802 x 5
## # Groups:   book [1]
##    book  word1    word2     word3         n
##    <fct> <chr>    <chr>     <chr>     <int>
##  1 Emma  dear     miss      woodhouse    23
##  2 Emma  poor     miss      taylor       11
##  3 Emma  abbey    mill      farm          5
##  4 Emma  marrying jane      fairfax       4
##  5 Emma  woman    lovely    woman         4
##  6 Emma  bad      sore      throat        3
##  7 Emma  box      hill      party         3
##  8 Emma  harriet  cried     emma          3
##  9 Emma  lovely   woman     reigns        3
## 10 Emma  miss     fairfax's situation     3
## # … with 1,792 more rows
trigrams_united <- trigrams_filtered %>%
  unite(trigram, word1, word2, word3, sep = " ")
trigrams_united
## # A tibble: 1,893 x 2
## # Groups:   book [6]
##    book  trigram                        
##    <fct> <chr>                          
##  1 Emma  jane austen volume             
##  2 Emma  emma woodhouse handsome        
##  3 Emma  woodhouse handsome clever      
##  4 Emma  affectionate indulgent father  
##  5 Emma  highly esteeming miss          
##  6 Emma  esteeming miss taylor's        
##  7 Emma  miss taylor's judgment         
##  8 Emma  disagreeable consciousness miss
##  9 Emma  consciousness miss taylor      
## 10 Emma  miss taylor married            
## # … with 1,883 more rows
trigram_tf_idf <- trigrams_united %>%
  count(trigram)
trigram_tf_idf <- trigram_tf_idf %>% 
  filter(n > 1)
ggplot(aes(x = reorder(trigram, n), y=n), data=trigram_tf_idf) + 
  geom_bar(stat = 'identity') + 
  ggtitle(paste("The Most Common Trigrams in Novel -", v_book)) + 
  coord_flip()