↩
# Week 1 (October 9-15)

## Tutorials & Resources

### Introduction to the course, data wrangling, and R

### Managing your workflow

## Assignment

## Class

Welcome to week 1. Although we will not meet in class until the end of this week (Saturday, October 15^{th}), I do not want to waste time in getting started. We only have 7 weeks together (😢) so I want to pack each week as full as possible. I am assuming you have fully read the syllabus by now but if not please do so that you understand how this class is structured and what is expected of you. I will spend the first few minutes of class on Saturday re-iterating the details so that we are all on the same page but I do not want to spend 30-60 minutes doing so, so make sure you read (and re-read) it thoroughly.

The focus of this week is to get yourself (re-)introduced to data wrangling, R, and the general workflow that makes for productive analyses. Below outlines the tutorials that you need to review, additional resources available to you, and the assignment that is due at the beginning of Saturday’s class. If you have any questions or concerns your first step should be going to our slack channel and posting your issue. You and your classmates should be monitoring slack to help each other out. In addition, I will also be watching slack and will chime in when necessary but my hope is that this will be a social process where everyone contributes to knowledge advancement.

Please work through the following tutorials prior to Saturday’s class. The skills and functions introduced in these tutorials will be necessary to complete your assignment, which is due at the beginning of Saturday’s class, and will also be used in Saturday’s in-class small group work.

- Read about the Role of Data Wrangling
- Work through the R Basics tutorial to (re-)familiarize yourself with the basic functionality of R and RStudio

- Work through the R Projects tutorial
- Work through the R Markdown tutorial
- Optional: Read the R Markdown chapter in the R for Data Science book
- Optional: For the more ambitious folks, work through the R Notebook tutorial. This will require you to install the Preview Release version of RStudio.

- Create an R Project that will be your central project directory for this class. Title this R Project “Data Wrangling with R (BANA 8090)”.
- Create a .R script titled “week-1.R” and in this script perform the following exercises:
- compute
- what is the remainder when 3333 is divided by 222?
- investigate the behavior of for large, integer values in
*n*. - the Economic Order Quantity (EOQ) gives the optimal order quantity as where
*D*is the annual demand,*K*is the fixed cost per order, and*h*is the annual holding cost per item. Create and set the variables , , and and compute the associated value of Q. - for an initial principal amount
*P*and a nominal annual interest rate*r*that is compounded*n*times per year over a span of*t*years, the final value of a certificate of deposit is . Create and set the variables , , , and and compute the associated value of*F*.

- Create an HTML R Markdown file titled “week-1.Rmd” that includes two sections:
- Section 1 will be an introduction of yourself that describes where you are from, your academic and professional background, your experience with R (or other coding languages), and what your plans are after you complete your UC masters degree. This section will serve as a way to introduce yourself to your small group peers.
- In section 2 you will use code chunks to complete the exercises you performed in the .R script in your R markdown file.
- “Knit” this .Rmd file so that you produce a “week-1.html” file. You will find an example here of the basic output I am looking for but feel free to be creative and test out the many syntax features for R Markdown.

See you in class on Saturday!

**1. Lecture:** In today’s lecture we are going to create an automated R Markdown report. Please download this material:

**2. Group Work:** Each of you have been psuedo-randomly assigned to a group (psuedo because your skill level influenced the random order); you can find your group number here. Working with your groups I want you to turn your homework assignment, which should look something like this into a presentation format that looks like this. You may want to consult the links provided at http://uc-r.github.io/r_markdown#presentations-slides for available options. Each student should produce their own presentation; however, leverage your group to help each other. If you complete this and have available time, work with your small group to re-produce this HTML file.