DataThink Development
  • Modules
  • R Help
  • Resources
    • Course Textbook
    • R for Data Science
    • Git/GitHub and R
    • R Markdown: The Definitive Guide
    • Geocomputation with R

    • Supplemental Material
    • Happy Git and Github for the useR
    • plotly for R
    • Computing in R for Social Sciences
    • Statistical Concepts in Presenting Data:
    • Advanced R
    • R Packages
    • Tidy evaluation
    • Fundamentals of Data Visualization
    • Geocomputation with R
    • Crosstalk: htmlwidgets add-on

On this page

  • Case Study 7: Counting names in scripture
    • Background
    • Reading
    • Tasks
    • Code

cs-07

Case Study 7: Counting names in scripture

Background

In 1978 Susan Easton Black penned an article in the Ensign title Even statistically, he is the dominant figure of the Book of Mormon. which makes some statistical claims about the Book of Mormon. With our “string” skills we are going to check her result and build an improved statistic using using number of words between references.

  • Course Website

Reading

This reading will help you complete the tasks below.

  • o The Book of Mormon
  • o Populating missing values

Tasks

Code

# To get the standard works data
scriptures <- rio::import("http://scriptures.nephi.org/downloads/lds-scriptures.csv.zip")

# to get the Savior names
bmnames <- read_rds(gzcon(url("https://byuistats.github.io/M335/data/BoM_SaviorNames.rds")))

# your script might use the following functions
stringr::str_detect()
stringr::str_locate_all()
stringr::str_replace_all()
stringr::str_extract_all()
stringi::stri_stats_latex()