---
title: "Lab 1"
subtitle: "Programming for Statistical Science"
author: ""
institute: ""
date: ""
output:
xaringan::moon_reader:
css: "slides.css"
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
editor_options:
chunk_output_type: console
---
```{r include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = TRUE,
comment = "#>", highlight = TRUE,
fig.align = "center")
```
## Meet your TAs
- [Federico Ferrari](https://fedfer.github.io/)
- [federico.ferrari@duke.edu](mailto:federico.ferrari@duke.edu)
- Office hours (Zoom link in Sakai)
- Tuesdays 4:00 - 5:00pm
- [Quinn Frank](https://github.com/quinnfrank)
- [quinn.frank@duke.edu](mailto:quinn.frank@duke.edu)
- Office hours (Zoom link in Sakai)
- Tuesdays 1:30pm - 2:30pm
- Thursdays 1:30pm - 2:30pm
.small-text[
*All times listed are in Eastern Time.*
]
---
## Lab structure
- Work on the assigned lab.
- Work on homework (if outstanding).
- Ask questions about anything.
---
## Getting started
- Navigate to https://classroom.github.com/a/utEK_C9H to accept Lab 1 and
create your private repository within our GitHub course organization.
- Open an RStudio session (Rook); then go to
- `File` > `New Project`;
- select `Version Control;`
- select `Git`;
- paste the git URL - available at your GitHub
repo, `lab1-[github_username]`, when you click `Clone or download`;
- click `Create Project`.
You may do this on your local machine if you have git configured with
R/RStudio.
---
## Getting started
- With your RStudio project open, do a quick git configuration in the console
pane with
```{r}
# install.packages("usethis")
library(usethis)
use_git_config(user.name = "Shawn Santo", user.email = "shawn.santo@duke.edu")
```
*Replace my info with your name and email address associated with GitHub.*
- Follow the TAs live demo on how to stage, commit, and push. Today you may use
the Git GUI; on Wednesday we will show you how to use git from the
command line.
- As you work, make commits and push your work after you make significant
progress.
We will show you how to cache your credentials on Wednesday.
---
## Navigating R Markdown
Follow along as Federico and Quinn demonstrate the basics of R Markdown.
R Markdown resources:
- In RStudio: `Help > Cheatsheets > R Markdown Cheat Sheet`
- In RStudio: `Help > Cheatsheets > R Markdown Reference Guide`
- [R Markdown: The Definitive Guide](https://bookdown.org/yihui/rmarkdown/)
---
## Today's objectives
- Get comfortable with the version control cycle and R Markdown.
- Complete Lab 1.
- Work with those in your breakout room.
- This is not graded.
- Ask any questions about any recent course materials.