Homework Assignments
The instructions below will guide you through the process of submitting the homework assignments for this class.
Cloning Your Repository
To submit your homework assignments, you first need to clone your GitHub Classroom Assignment repository into your computer by following the steps below. You need to do this only once.
- Ctr+Click (to open in a new window) the GitHub Classroom Assignment invite link: https://classroom.github.com/a/yMw3U8gv
- If the Join the classroom screen appears, select your name from the list. If your name is not listed, let the instructor know.
- Click Accept this assignment
- Wait few second for GitHub Classroom to create your repository copy
- Refresh the webpage and a link should appear, if not, wait few more seconds and try again.
- Click the shown link to browse to the generated repository
- Click the Code button –> Open with GitHub Desktop
- Select an appropriate Local path on your machine –> click Clone
- Select For my own purposes option –> click Continue
- From the Repository menu –> select Show in Explorer/Finder
- From the opened menu, double-click the file ending in Rproj
Launching RStudio
Your homework should be opened in RStudio as a project. Check the upper-right corner of RStudio, if your homework repository name is shown there, then your are good to go. Otherwise, open GitHub Desktop –> from dropdown menu located on the top-left corner, select your homework repository if not selected –> Repository menu –> select Show in Explorer/Finder → double-click the file ending in Rproj
Adding HW to Your Project
Perform the following steps for each homework assignment:
- (HW1 Only) In the
hw
folder of your cloned Homework repository, create a new Quarto (.qmd) file: RStudio –> File pane –> Add New File (second icon from the left) –> Text File –> name ithw1.qmd
- (HWs Other than HW1) Add the provided Quarto (
.qmd
) file of the homework assignment to thehw
folder - Open the
_quarto.yml
file from RStudio –> File pane –> list the name of your homework assignment.qmd
file in an appropriate location under thechapters
section–notice how the sample file is listed. This step will ensure your homework assignment appear in the website after carrying out the rest of the steps.
Submitting Code
- After finishing a coherent part the assignment, hit the Render Book under the Build pane and inspect the generated website. If satisfied, head to GitHub Desktop –> in the message textbox, write a meaningful message, eg, Complete HW1 activity 3 –> click the commit button –> click the push button
- When done and ready for grading, redo the previous step but make sure your commit message say something like “HW1 ready for grading”.
Publishing Website
To make grading more efficient, publish your homework website by performing the following steps:
- In RStudio, open the Terminal (if the terminal is hidden, click Tools –> Terminal –> New Terminal)
- Type
quarto publish gh-pages --no-browser
–> a message will appear, type Yes (or simply hit Enter) to confirm. If the File Deleted dialog pops up, click Yes and wait till the operation finished and a URL appears. Clicking the URL should lead to a 404 page which is what is expected since your GitHub repository is private.