This assignment includes two exercises focusing on string manipulation in R. The first exercise analyzes word frequencies in Jane Austen's "Pride and Prejudice" to identify the most common words, excluding stopwords. The second exercise involves creating a custom Pig Latin converter function that modifies English words according to specific rules.
- Objective: Analyze "Pride and Prejudice" to plot the most common words, removing stopwords.
- Tools Used:
janeaustenr,tidyverse,tidytext,stopwords
- Objective: Create a function that converts words into a customized version of Pig Latin.
- Tools Used:
stringr
To run the analysis and view the results:
- Install R and RStudio.
- Install the required packages using R commands:
install.packages("janeaustenr") install.packages("tidyverse") install.packages("tidytext") install.packages("stopwords") install.packages("stringr")
- Run the R scripts provided in the R Markdown file.
assignment.Rmd: Contains the detailed code for both exercises.assignment.md: Markdown file generated from the R Markdown file.assignment_files/figure-gfm/: Folder containing the plot generated in Exercise 1.readme.md: Documentation file.