git clone [SSH_ADDRESS] ~/203b-hwLab 2: Getting Started With Homework
Biostat 203B
This tutorial assumes that you have already installed R, RStudio, and Git on your computer. If not, please refer to the Lab 1.
1 Set up GitHub repo for 203B homework
On https://github.com/, create a private repository
biostat-203b-2026-winterand addHua-Zhouand TA team (BowenZhang2001for Lec 1;Tomoki-Okunoandyucaisfor Lec 82) as your collaborators with write permission. This repository is for submitting your 203B homework.You can use RStudio to git clone the
biostat-203b-2026-winterrepository to your local machine:File->New Project...->Version Control->Git-> inputRepository URL:,Project directory name:(203b-hw).Alternatively, in Terminal (Mac Terminal, Windows WSL, Windows Git Bash), you can run
to clone your homework repository to a folder called 203b-hw under your home directory on your computer. [SSH_ADDRESS] is obtained by clicking the menu <> Code -> SSH on the repository page on GitHub. Then you can double click the biostat-203b-2026-winter.Rproj file to open the RStudio project.
2 MIMIC Data
Much of homework and exercises are demonstrated on the MIMIC-IV v3.1 data set. Download the data to your computer (10.66 GB), and make it available at ~/mimic. For example, you can create a symbolic link by
ln -s /PATH/TO/YOUR/MIMIC_FOLDER ~/mimicYour homework solution should always read MIMIC data from ~/mimic. This is critical for TA team to reproduce your homework.
ls -l ~/mimic/total 56
-rw-r--r--@ 1 huazhou staff 15199 Oct 10 2024 CHANGELOG.txt
drwxr-xr-x@ 26 huazhou staff 832 Mar 5 2025 hosp
drwxr-xr-x 14 huazhou staff 448 Feb 22 2025 icu
-rw-r--r-- 1 huazhou staff 789 Dec 28 2024 index.html
-rw-r--r-- 1 huazhou staff 2518 Oct 10 2024 LICENSE.txt
-rw-r--r-- 1 huazhou staff 2884 Oct 11 2024 SHA256SUMS.txt
If you put MIMIC data in Box and access it using Box Drive program on Windows, you’ll find that you cannot read that folder from WSL. You can resolve it following instructions in this issue or simply copy MIMIC data from Box to your regular Windows file system.
3 Start with homework 1
On your local machine:
- Clone the repository, create
developbranch, where your work on solutions.
Some useful git commands:
# clone the project
git clone git@github.com:[USERNAME]/biostat-203b-2026-winter.git 203b-hw
# enter project folder
cd 203b-hw
# what branches are there?
git branch
# create develop branch
git branch develop
# switch to the develop branch
git checkout develop
# create folder for HW1
mkdir hw1
cd hw1
# let's write solutions
echo "sample solution" > hw1.qmd
echo "some bug" >> hw1.qmd
# commit the code
git add hw1.qmd
git commit -m "start working on problem #1"
# push to remote repo
git push- Submit and tag HW1 solution to the
mainbranch. Useful git commands:
# which branch are we in?
git branch
# change to the main branch
git checkout main
# merge develop branch to main branch
# git pull origin develop
git merge develop
# push to the remote main branch
git push
# tag version hw1
git tag hw1
git push --tags- RStudio has good Git integration. But practice command line operations also.
4 Homework 1
- Demo Q2, Q3.1, Q3.2, Q5, Q6.
5 Grading guideline
Your submission will graded according to this guideline.