Chapter 5 Assignment: Set up your computing environment
The course relies on computing resources. Please install the software as indicated on your local machine, and familiarize yourself with the associated documentation.
Topics: R, R Studio, git, Github, Markdown, R Markdown, Tidyverse and tidyverts packages for R
Assignment: Follow instructions in the course Computing setup guide.
5.2 Git and Github
Reference: Happy Git and GitHub for the useR
Git is software for version control. Github is a web service that provides remote storage and access to files via git. This setup greatly facilitates collaboration between multiple individuals working on the same code base.
First watch this short YouTube video to get an orientation to git and Github: Git and GitHub for an Organized Project (STAT 545 Episode 2-A) from the University of British Columbia.
Then install git on your machine and link it to your R Studio instance and your file repository on Github:
- Follow these instructions to download and install git and to link git with R Studio.
A collection of files associated with a single project is in git-speak called a “repository” or “repo”. You should already have a basic repo set up for you on the course site on Github. The next step is to copy (“clone”) this remote repo to your local machine.
- Clone your course repo on Github to a new R Studio project on your local machine.
- Navigate to the course website on Github. Select your repo.
- Click on the green button labeled “Code”. Copy the URL.
- In the R Studio window, from the pull-down menu in the upper-right corner, select
New Project...
,Version Control
,Git
. Paste the URL into the dialog box labeledRepository URL
. - Optional: Change the name of the project folder, and the location of this folder on your local directory tree.
- Click on
Create Project
. The files from your remote repo should be copied to your local machine in a new folder with the name you chose.
- Optional: Download and install the Github desktop client, or an alternative GUI client.
- The git operations you need for this course can be managed within R Studio, from the
Git
tab. Some more advanced operations require using either a Terminal window, or a Git desktop client.
- The git operations you need for this course can be managed within R Studio, from the
As you get going, you will likely want to learn more about how to work with git and Github. Review the documentation for git and this Github Guide. Learn the basics.
5.2.1 Using personal tokens to access Github
Github is phasing out the use of passwords for authorizations.
---- Forwarded Message -----
From: GitHub <noreply@github.com>
To: Arthur Small <asmall@virginia.edu>
Sent: Sunday, February 21, 2021, 6:20:58 AM EST
Subject: [GitHub] Deprecation Notice
Hi @arthursmalliii,
You recently used a password to access the repository at uva-eng-time-series-sp21/coronato-nicholas with git using git/2.30.0.
Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates.
Thanks,
The GitHub Team
Instead, you must create a personal access token. See the Github documentation.
5.3 Markdown and R Markdown
Markdown is a markup language: a set of formatting instructions for rendering documents. R Markdown is an extension of Markdown that allows for embedding chunks of R code into a Markdown document. In this course, we will write our work in R Markdown within the R Studio environment, then use the knitr
package to generate HTML and PDF output files.
For a nice introduction to Markdown and R Markdown, watch the short YouTube video Reproducible Reports with R Markdown (STAT 545 Episode 3-A) from the University of British Columbia.
As you proceed in creating your documents, you will probably want to access additional resources:
From within R Studio, you can access an R Markdown Cheat Sheet via
Help/Cheatsheets
.Markdown reference: https://www.markdownguide.org/
R Markdown reference: https://rmarkdown.rstudio.com/
5.4 Bibliographic resources: Zotero and Bibtex
[Coming soon…]
5.5 General course web resources
- Collab class site, for basic course information, assignments, office hours sign-up, links to online textbook and other resources.
- Github class site, for posting and sharing code.
- Zoom, for class sessions, recordings, and office hours.