https://jblair.rstudio.cloud/8f54f078b9a44cccb27296978bf6cb5e/file_show?path=%2Fcloud%2Fproject%2FREADME.html

1 answer below »
Answered Same DayApr 14, 2021

Answer To: https://jblair.rstudio.cloud/8f54f078b9a44cccb27296978bf6cb5e/file_show?path=%2Fcloud%2Fproject%2FRE...

Naveen answered on Apr 19 2021
133 Votes
# install required packages
install.packages("tidytext")
install.packages("scriptuRs")
install.packages("boot")
insta
ll.packages("gginference")
install.packages("BSDA")
# load required packages
library(tidytext)
library(scriptuRs)
library(magritbntr)
library(dplyr)
library(ggplot2)
library(boot)
library(gginference)
library(BSDA)
## Defining Null & Alternative hypothesis
## NULL Hypothesis H0: there are no unique words among different books
## Alternative Hypothesis H1: there are unique words among different books
# creating a vector for "scriptures"
scriptures <- lds_scriptures()
scripture_tokens <- scriptures %>% unnest_tokens(output = word,input = text)
tidy_books <- scripture_tokens %>% count(word,sort=TRUE)
scripture_tokens %>% count(word,sort=TRUE) %>% head(3)
# ploting the count of unique words among all books for more than 5000 simulations
tidy_books %>% filter(n > 5000) %>% mutate(word = reorder(word, n)) %>%
ggplot(aes(word, n))+
geom_col()+
xlab(NULL)+
coord_flip()
books_words <- lds_scriptures() %>% group_by(book_title) %>%
unnest_tokens(output = word,input = text) %>%
count(word)
b=table(books_words$book_title)
cat("Most unique words...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here