Welcome!
The purpose of this page is to equip you with the software and tools necessary to successfully complete the certificate!
You will:
Install R & R Studio
Create a Github Account
Install Git
Link R Studio & Github
Learn how to accept and turn in assignments with R Studio and Github Classroom
Follow this video created by Kristen Sosulski for the New York University’s Stern School of Business
Before you create your account, here are some awesome tips from happygitwithr
Visit Github and sign up for an account!
Make your github profile more personal by creating a README file
Here is my github account for reference
Here’s where the magic happens! All of the content under this heading comes from the Masters of Environmental Data Science Program at UC Santa Barbara, Bren School of Environmental Science & Management (my alma mater :) )
For Mac User
You should already have git on your device, but let’s check for it anyway.
Open RStudio
In the Terminal, Mac uses run the following command:
which git
where git
/usr/local/bin/git
.
git config --global user.name "Jane Doe"
git config --global user.email janedoe@example.com
git config --list --global
First: What even is a personal access token? From GitHub’s documentation:
Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the GitHub API or the command line.
This means that in order to push your work (files, scripts, etc.) from your laptop (or any other computer) to GitHub, you’ll need to first to generate a PAT.
usethis
package in R by running the following in the RStudio Console:install.packages(“usethis”)
A lot of scary looking red text will show up while this is installing - don’t panic. If you get to the end and see something like below (with no error) it’s installed successfully.
usethis::create_github_token()
In the Note field, you should see some autopopulated text: R:GITHUB_PAT
. We suggest changing this to something that signifies what machine it’s being used for. For example, if you are generating a PAT for your laptop, you might choose to rename it, my_laptop
.
Next, you’ll see a section called Select scopes with reasonable options already selected for you. Do not change anything. Just scroll down to the bottom of that page and click the green ‘Generate token’ button:
Copy the generated PAT to your clipboard
Back in RStudio, in the console run:
gitcreds::gitcreds_set()
This will prompt you to paste the PAT you just copied from GitHub. Paste the PAT, press Enter to run. You should see something like this show up if all is well so far (you’ll have pasted your PAT where mine says “REDACTED”):
usethis::git_sitrep()
Does it return information about your connected GitHub account that looks something like below? Great! You’ve configured git and successfully stored your PAT.
vembedr::embed_url("https://www.youtube.com/watch?v=O9xVCM670cE")
Copy your specific repository link (seen in video)
Create a new R Project
We’re here to help you! If any of this doesn’t go smoothly join us for office hours or set up a separate session with me by emailing me at connor.flynn@chaminade.edu.