Skip to content

stat545ubc-2024/assignment-b4-guorunhe-design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

String Manipulation and Custom Pig Latin Assignment

Overview

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.

Exercise 1: Word Frequency Analysis

  • Objective: Analyze "Pride and Prejudice" to plot the most common words, removing stopwords.
  • Tools Used: janeaustenr, tidyverse, tidytext, stopwords

Exercise 2: Custom Pig Latin Converter

  • Objective: Create a function that converts words into a customized version of Pig Latin.
  • Tools Used: stringr

Getting Started

To run the analysis and view the results:

  1. Install R and RStudio.
  2. Install the required packages using R commands:
    install.packages("janeaustenr")
    install.packages("tidyverse")
    install.packages("tidytext")
    install.packages("stopwords")
    install.packages("stringr")
  3. Run the R scripts provided in the R Markdown file.

Files

  • 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.

About

assignment-b4-guorunhe-design created by GitHub Classroom

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors