S4 · Chapter 2 · MC 451 Research Methods in Mass Media
We are doing one thing: getting four programs onto your laptop, making your own copy of the course workspace, and running a file that proves it all works.
Work along with me, do not watch first and do it later. Pause whenever you need to and rewind anything that goes past too fast. Nothing here is a race, and the video will wait.
Project Setup · 25 points · due Friday, September 11
mc451-workspaceWhat it is: the language that does the counting and the statistics.
Download from cran.r-project.org. Take the newest release for your operating system and accept every default.
On a Mac you have to pick the right file: Apple silicon or Intel. Apple menu, About This Mac, and read the chip.
Start this download now, then keep watching. It is the biggest of the four.
What it is: the window you will actually work in. It is a text editor, free, from Microsoft.
Download from code.visualstudio.com. Accept every default.
On a Mac, open the downloaded file and drag Visual Studio Code into Applications. Do not run it out of the Downloads window.
Your writing, your code, and your results all live here, so you stop switching between five programs to do one thing.
What it is: the thing that turns your file into a finished document.
Download from quarto.org/docs/get-started. Accept every default.
You write prose and code in one file, press render, and get back a document with the charts and numbers already dropped into place.
What it is: the program that keeps a history of your files, so nothing you write this semester can be lost.
Windows: download from git-scm.com/downloads. The installer asks a lot of questions. Next is the right answer to every one of them.
Mac: nothing to download. In Terminal type git --version. If a box offers to install developer tools, click Install and wait. That box is Git arriving.
Installers fail quietly. Open VS Code, then Terminal, New Terminal, and run these two:
quarto check is Quarto’s own self test. It checks itself, then goes looking for R, and prints a line for each thing it finds.
You should see: green check marks from quarto check, and a version number from Git.
Windows only: typing R --version says “not recognized” even when R is perfectly fine, because the R installer does not add R to the command line. On a Mac it answers normally. Either way, quarto check is the check that counts.
While the installers run:
Answer these in your journal this week. We pick them up when we next meet.
A repository, or repo, is just a folder that Git is watching. Ours has the course folder structure already in it.
Go to github.com/AURA-Lab-SIUE/v2v-workspace.
mc451-workspace. Leave it Public.You should see: the same folders, now under your own username.
Nothing is on your computer yet. Only on GitHub.
Ctrl+Shift+P, or Cmd+Shift+P on a Mac. A search bar drops down.Documents/MC451/ is a fine answer.You should see: your folder names down the left side of VS Code.
A box appears in the bottom right: “This workspace has extension recommendations.”
Click Install All. That is Quarto, R, and GitLens, and it means everyone in the course is working in the same environment.
If the box already vanished, press Ctrl+Shift+X and search for Quarto and for R by REditorSupport. Stuck? Install VS Code
Download it here, or from the blue button on the Resources page:
aura-lab.siue.edu/v2v-hub/starters/00-check-your-setup.qmd
Save it into your mc451-workspace folder, then open it in VS Code.
You do not have to write it. You do not have to understand it. You click through it one gray box at a time, and it tells you what each box should print.
Pause here and work through the whole file. The rest of this video assumes you have.
The file finishes by running a checker we wrote for this course:
You want: green check marks all the way down Required R packages.
Red next to Quarto or Git is fine if you have not reached those steps yet.
Red under Required is the one that needs me. Email me that whole block of output, exactly as it appears, rather than describing it.
quarto: command not found. That terminal opened before Quarto finished installing. Close it, open a new one. This is the single most common problem in the whole setup.there is no package called 'v2v'. R is fine, the package is not there yet. Rerun the install step inside the check file.Every line should be true before you stop:
quarto check comes back clean, and git --version answersmc451-workspace exists on GitHub, and is cloned into VS Code00-check-your-setup.qmd runs and setup() comes back greenIf any line is not true, do not leave it there. Email me the exact wording of the error, or bring the laptop to office hours. Closing the laptop and hoping is the one approach that never works.