---
title: "Lab 2"
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")
```
## Getting started
- Navigate to https://classroom.github.com/a/sejG8Dhe to accept Lab 2 and
create your private repository within our GitHub course organization.
- Open an RStudio session (Rook - use R 3.6.1); then go to
- `File` > `New Project`;
- select `Version Control`;
- select `Git`;
- paste the git URL - available at your GitHub
repo, `lab2-[github_username]`, when you click `Code`;
- click `Create Project`.
You may do this on your local machine if you have git configured with
R/RStudio.
---
## Today's objectives
- Complete Lab 2.
- Work with those in your breakout room.
- This is not graded.
- Use the extra to time to work on Homework 1.
- Ask questions about recent course materials.
---
## Get updates from a forked repo
1. Fork your repo of interest.
[sta523-fa20/exercises](https://github.com/sta523-fa20/exercises)
2. Clone the repo using HTTPS.
```{bash eval=FALSE}
git clone
```
3. Navigate to inside this local repo.
4. Add a new remote associated with the location of the repo on GitHub that
you forked. Give this new remote a nickname: `upstream`.
```{bash eval=FALSE}
git remote add upstream https://github.com/sta523-fa20/exercises.git
```
5. Verify that `upstream` has been added.
```{bash eval=FALSE}
git remote -v
```
6. As new contents are added or updated to the `upstream` master branch,
update your local branch.
```{bash eval=FALSE}
git pull upstream master
```