Before you can collaborate using GitHub, both you and your collaborator have to install software and setup accounts as follows.
Both you and your collaborator install R and RStudio on your local machines.
Windows users may have to login as an Administrator before installing the software.
- R and RStudio already installed? Stay current—update the R habitat
- Install R for your operating system
- Install RStudio, a user interface for R
Both you and your collaborator install git on your local machines. Once installed, we access its functionality via the RStudio interface. In the following guidelines, please read through an entire section before starting the installation.
- Git already installed?
- Windows install
- Mac OS install
- Linux install
Both you and you collaborator need a GitHub account.
GitHub is a hosting service that provides an online home for your Git-based projects—critically important for sharing with collaborators. Once you have a GitHub account, you will update your repositories using the RStudio interface.
Once you have a GitHub account, do the following steps to make the connection between RStudio and GitHub fast and easy. Please read through an entire step before starting that step.
- Some instructions ask you to type commands in the “shell.” To access the shell, open RStudio and use the pulldown menu Tools > Shell.
- Introduce yourself to Git using the name and email you used with your GitHub account
- Cache your username and password or so you do not need to authenticate yourself to GitHub interactively ad nauseum. Alternatively, you can set up SSH keys.
- Prove RStudio can find local Git and, therefore, can talk to GitHub
Cleanup
- Close the Shell window
- Delete the test project on your machine
- Delete the test repo on GitHub, Settings > Danger Zone > Delete this repository