Github
Github has changed the course of data science (and software development more generally). Don’t do this:

Instead, use version control. Git enables this. Then, github puts your files online.
We will not get into the full depths of version control. Instead, we will touch the surface by turning in homeworks on github.
There are lots of excellent resources on git, github, and how to use them with RStudio. I fully expect that everyone will encounter difficulties with these next steps. Please try google before asking for help. Please ask your neighbor for help. Please help your neighbor.
Start here to install git and use it with RStudio. Note: That page describes how to install git (ignore the parts about “subversion”).
After that, you need to be able to “push” your commits to github (to turn in homework!). These notes help you to make this leap to github. In particular, you will need to make a github account. For now, ignore the prerequisite about using the command line.
All of the above steps are a “fixed / one-time” cost. Once they are done, you will then do the following steps to download a homework and turn it in.
- First, click on the link for the homework that I provide on the class webpage. That will lead you to a series of prompts. Click through those prompts. By clicking through, it should copy my files (i.e. “repository”) and make you a “repository” or a “repo”. It might take awhile for the files to download. While you wait, you can start the next steps.
- Go to Rstudio and create a new Rstudio “project”. On the first screen that pops up, all the way at the bottom, there should be an option “Version Control”. Click on that. Then, “Git”.
- Go back to your web browser. If the files from step 2 are done copying, then you should have a repo page that looks like this. On the right side of the page, click the button “Clone or download” in your repo. Copy that web address that comes up.
- Back in RStudio, paste that url in “repository URL”. You can give it your own name. Then, find a folder where you want to save it on your computer. Ideally, you already have a folder for this class. Then, click “create project”.
- You can then edit the files and make new files (i.e. do the “actual work”). Along the way, you can click on the cool new “github” icon at the top of RStudio. Click “commit”, select the files that you want to save, and provide a brief explaination of the changes that you made since the last time you click commit.
- When you want to move all of your updates to github (i.e. online), again, click the cool new “github” icon. This time click “push branch”. You may be asked for your github user name and password.
- After the push is complete, go back to your repo’s webpage and see if you can see the changes!