Frequenly Asked Questions

CLASS STUFF

I can’t get into the class slack

If you registered for the class, you should have been sent a link at the start of the semester to join the class Slack. If not, email Professor Helveston for an invite link. I recommend using your @gwu.edu email to sign up, but if you use another email for another Slack then use that.

How do I make a zip file?

Mac

Windows

Where can I see my grades?

GitHub

I do not use Blackboard for showing your grades, so please ignore anything you see there. Instead, I create a unique, private repo on the class GitHub organization for each of you. The repo will be named eda-netID (for example, Prof. Helveston’s GW netID is jph, so his folder would be eda-jph). It should be the only repo you see in the organization.

You will use this repo both for submitting assignments and for receiving graded feedback.

In the feedback folder in that repo, you will see a pdf of feedback for each assignment as well as two CSV files: one that displays your grade for each assignment, and another that shows your current total grade in the class.

When can I expect to see a grade for my assignment?

Since homeworks are due the night before class, I usually can’t grade them all by the start of class. Some weeks it can take me up to a whole week to grade something, so at most you can expect to see a grade one week after submitting it.

How can I submit my homework late?

I use the submission timestamps on GitHub to determine if a submission is on time or not. If you’ve updated the assignment past the due date, it is considered late.

Now, you do have some “free” late days - see the class late policy for details. But even so, if you’ve completed an assignment but it’s now late, please do go ahead and submit it. Better to get some credit for it than none. Just push your work to your submission repo.

Can I make up a quiz if I’m late or miss class?

No - see the policy in the syllabus on this for any exception.

R / POSITRON STUFF

My R / Positron is totally FUBAR, what should I do?

If you want to get back up to speed quickly, you can open a cloud version of Positron on the web at https://posit.cloud/plans/free. It isn’t the IDE we use in class, but it will run your R code in a pinch.

You can try to troubleshoot, but often the next easiest thing to do is just re-install R and Positron. Be careful to save your work first!

Positron won’t let me save my file

Most often times this occurs for one of two reasons:

  1. You may have double-clicked the .qmd or .R file instead of opening the folder it lives in. Positron then isn’t “looking” at that folder, so your file paths break. Close it, then use File › Open Folder… and choose the folder itself.
  2. If you’re on a windows computer, you may have opened the file from inside the zip file. As a result, you can’t save anything because everything is still zipped up. Go back and extract the files from the zip first (right-click the zip and choose “extract all”), then open the extracted folder in Positron.

I’m trying to read / write some data using file.path() and it says the path doesn’t exist.

Have you double-checked that the file name you defined is the same as the data file name? For example, if there is a folder called “data” and inside it a data file called “some_data.csv”, then your path should be file.path('data', 'some_data.csv').

Paths are relative to the folder you opened in Positron, so also check that you opened the class folder itself — not the folder containing all your class folders.

If the file names look correct, then see the two issues in the above question

I keep seeing a + sign in the console…

If you start a command but don’t complete it, R will show a + sign because it’s waiting for you to finish it. Here’s an example:

5 +

If you press enter, R will show a + sign, and each time you press enter you’ll get more + signs. This is because R wants you to “finish” the command (it expects another number).

The easiest way to get out of this is to press the “Escape” key. Do that, and you’ll get back to the > R console.

I got this error message

could not find function "functionName"

  • Did you load the package that contains functionName?
  • Did you spell functionName correctly?

How to load a file under my project directory

In Positron, you open a project with File › Open Folder… and choose the folder itself — never by double-clicking a file inside it. This has two purposes:

  1. It points Positron at the project folder.
  2. It sets your working directory to that folder, which is what all your file paths are relative to.

For example, say you opened the folder located at:

/Users/your_name/Documents/my_project

Then, your working directory starts from here. Your manipulations of files in your project only happens below this directory.

Let’s load a csv file as an example. Say you have a file located under this directory:

/Users/your_name/Documents/my_project/data/file.csv

Then, to load it, run:

library(readr)

path <- file.path("data", "file.csv")
df <- read_csv(path)

file.path() builds the path from the folder you opened in Positron, joining the pieces with the right separator for your operating system. Its inputs of "data" and "file.csv" are below that folder.

By running read_csv(path), your data is loaded to df.