BIOSTAT 214: Programming for Health Data Science in R II (Fall 2022)
Section outline
-
-
Biostat 213 (completed 2020 or later) is a prerequisite for Biostat 214.
Please make sure you are comfortable with all the prerequisite material before the start of the 214. -
https://class.lambdamd.org/pdsr/
The online book covers the material discussed in Biostat 213 & Biostat 214 and is updated regularly.
It serves as a reference to be used parallel to the in-class demonstration and discussion, not as a substitute.
Chapters to read ahead of class are listed in the weekly schedule. -
Discord invite URL
We will use Discord (https://discord.com/) for live chat during class and between classes.
You can access the class Discord server online or using the desktop or mobile apps.
The link is an invite to the ProgDatSciX server - if you are already on the server from Biostat 213,
don't create a new account, just ask to be added to the class role (Biostat214 Fall 2022).Discord allows us to easily:
- Share code with syntax highlighting
- Organize Q&A topics by channels and threads for easier navigation
- Screen share for troubleshooting
Please keep use of the Discord server within work days and hours.
-
Biostat 214 Fall 2022 Course Guidelines URL
-
Biostat 214 Fall 2022 In-Person Attendance form URL
Please sign in each week if you are attending in person
-
Biostat 214 Fall 2022 code review pairs URL
Please identify a code review partner.
Limit to pairs of two, if there is an odd total number of participants, we can have one group of 3.In the beginning of each class, we will spend 9 minutes reviewing each other's code, before going over the solutions.
-
Class notes URL
-
Core R language refresher
- Introductions
- Data types and structures
- Indexing; Aggregating
- Control flow
- Intro to Markdown/Rmarkdown/Quarto
Faculty: Stathis Gennatas
Location: Byers GH 106 (PLEASE NOTE THAT THIS COURSE WILL BE IN THIS ROOM ON 9/15 AND 11/10. ALL OTHER DATES IN MH-1400)-
Lecture Recording 2022 URL
-
Biostat 214 2022-09-15 Screen Recording Media Resource
-
Functions
- Writing R functions
- Warnings and errors
- Function scoping rules
Book chapter: Functions
Faculty: Stathis Gennatas
Location: Mission Hall 1400
-
Biostat 214 Fall 2022 Assignment 1
-
Biostat 214 2022-09-22 Screen Recording Media Resource
-
Biostat 214 Fall 2022 Assignment 1 Solutions File
-
No class:
Go over Chapters 5-15 and write down any questions,
preferably with code examples.
Submit on #question-queue channel on Discord. -
Loop functions: the apply family
- Loop functions: apply(), lapply(), sapply()
- Anonymous functions
Required reading before class: Loop Functions
Faculty: Stathis Gennatas
Location: Mission Hall 1400
-
Biostat 214 Fall 2022 Assignment 2
-
Biostat 214 2022-10-06 Screen Recording Media Resource
-
Biostat 214 Fall 2022 Assignment 2 Solutions File
-
-
Biostat 214 Fall 2022 Assignment 3
-
Biostat 214 2022-10-13 Screen Recording Media Resource
-
Biostat 214 Fall 2022 Assignment 3 Solutions File
-
-
No class
-
Working with Strings
- String operations
- Regular expressions
Required reading before class: Strings
Faculty: Stathis Gennatas
Location: Mission Hall MH1400-
Biostat 214 2022-10-27 Screen Recording Media Resource
-
Efficient Data Analysis with data.table
- Reading data with fread()
- Setting column name & order, keys
- Fast filter, select, group by operations
- In-place data transformations and operations
- Table reshaping
- data.table joins
Required reading before class:- Background: 2014 data.table talk
- data.table intro
- data.table basics
- data.table IO
- data.table reshape
- data.table joins
Faculty: Stathis Gennatas
-
Biostat 214 Fall 2022 Assignment 4
-
Biostat 214 Fall 2022 Assignment 4 Solutions File
-
Working with Date and Time data; the S3 class system
- The Date and POSIXct objects
- Date formats
- Date operations
- The pipe operator: |> (base) and %>% (magrittr)
- The S3 class system and generic functions
Required reading before class:Faculty: Stathis Gennatas
Location: Genentech Hall GH 106 (PLEASE NOTE THAT THIS COURSE WILL BE IN THIS ROOM ON 9/15 AND 11/10. ALL OTHER DATES IN MH-1400)
-
Biostat 214 Fall 2022 Assignment 5
-
Biostat 214 2022-11-10 Screen Recording Media Resource
-
Biostat214 Fall2022 Worksheet 5 Solutions File
-
Visualization
- base vs. grid graphics
- review of base graphics
- introduction to ggplot2
- introduction to interactive graphics with plotly
Required reading before class:Preparation:
Please install packages ggplot2 and plotly ahead of class.
Faculty: Stathis Gennatas
Location: Mission Hall 1400-
Biostat 214 2022-11-17 Screen Recording Media Resource
-
Course review
- Data input and cleaning pipeline overview
- Future of Health Data Science discussion: education & practice
- Please bring any questions on course, ideally with code examples if possible
- Submit on the #question-queue channel any time before class
Book chapters: Everything covered during the course
Location: Zoom (see link below)
-
Zoom link URL
-
Biostat 214 Fall 2022 Final Project Assignment
-
Biostat 214 2022-12-01 Screen Recording Media Resource

