Final Project- TempConversion and Chipotle Packages

Originally, I really wanted to do a text mining package related to law but it was becoming too complex and I had like 6 steps and cleaning the data before was a mess. I honestly plan on picking this R package back up in the summer and trying to make it work.

The R package(s) that I did for the final project include a temperature conversion package and a “fun” Chipotle ordering package.

https://github.com/mslement/TempConversion

https://github.com/mslement/Chipotle

Links to my GitHub Repositories to download my packages

Resources I used to create the R packages:

https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/ (provided by Dr.Friedman)

https://www.youtube.com/watch?v=9PyQlbAEujY (video that is literally amazing to follow and was the only thing that made my R package “Build & Reload”

Basically I followed the video linked to create my R projects and packages. The only thing that I had trouble with was with making the DESCRIPTION file but with some research I was able to fix it.

> load_all()

Error: No root directory found in /Users/michelleslement/Desktop/R Programming/Final Project/Chipotle or its parent directories. Root criterion: contains a file `DESCRIPTION`

> use_description() #FIXED

R Code showing my troubles with creating DESCRIPTION file

So, my first R package that I made included simple functions to convert Celsius to Fahrenheit(celsToFah(s)) and Fahrenheit to Celsius(fahToCels(f)).

These were very simple functions and I realized that there are literally at least 10 on the internet as examples and I need to think of something unique.

R Code for Both Functions in TempConversion

So, that brings me to my second package: Chipotle

This R package that I made included simple functions that displayed the menu(menuDisplay()) and one to order and show the price of the order(orderBowl(meat, rice, bean, top, extraTop)).

R Code for menuDisplay() Function
R Code for orderBowl() Function

The conversion package is honestly more useful. But after I did my peer reviews, I wanted to do something more fun.

Also, the downfall to the second package is that you can’t implement a data set within the function like you can with the temperature conversion one.

Examples of uses of both packages are in the README files in my GitHub.

Leave a comment

Design a site like this with WordPress.com
Get started