Section outline

    • Programming for Health Data Science in R II  

      (Click for Course Description)

      BIOSTAT 214 Fall 2022 (1.5 units) .

      Course Director: Stathis Gennatas, MBBS, PhD
      Assistant Professor, Department of Epidemiology and Biostatistics.

    • 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.


      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 Course Guidelines URL
      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 In-Person Attendance form URL

      Please sign in each week if you are attending in person

      Not available unless: You belong to Registered Students
    • 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.

      Not available unless: You belong to Registered Students
    • Class notes URL
      Not available unless: You belong to Registered Students
  • Core R language refresher 

    • Introductions
    • Data types and structures
    • Indexing; Aggregating
    • Control flow
    • Intro to Markdown/Rmarkdown/Quarto

    Book chapters: 
    PDSR 
    1-14, 38-39
    Please make sure to go over all this material ahead of class

    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
      Not available unless: You belong to a group in Registered Students Only
    • Biostat 214 2022-09-15 Screen Recording Media Resource
      Not available unless: You belong to Registered Students
  • 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
      Not available unless: You belong to Registered Students
    • Biostat 214 2022-09-22 Screen Recording Media Resource
      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 Assignment 1 Solutions File
      Not available unless: You belong to Registered Students
  • 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
      Not available unless: You belong to Registered Students
    • Biostat 214 2022-10-06 Screen Recording Media Resource
      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 Assignment 2 Solutions File
      Not available unless: You belong to Registered Students
  • Reshaping and table joins

    • Reshaping
    • Table joins

    Required reading before class:

    Take some time to get familiar with reshaping and table joins and ahead of class.

    Faculty:  Stathis Gennatas


    Location: 
    Mission Hall 1400


    • Biostat 214 Fall 2022 Assignment 3
      Not available unless: You belong to Registered Students
    • Biostat 214 2022-10-13 Screen Recording Media Resource
      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 Assignment 3 Solutions File
      Not available unless: You belong to Registered Students
  • 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
      Not available unless: You belong to Registered Students
  • 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:


    Faculty: 
    Stathis Gennatas


    • Biostat 214 Fall 2022 Assignment 4
      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 Assignment 4 Solutions File
      Not available unless: You belong to Registered Students
  • 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
      Not available unless: You belong to Registered Students
    • Biostat 214 2022-11-10 Screen Recording Media Resource
      Not available unless: You belong to Registered Students
    • Biostat214 Fall2022 Worksheet 5 Solutions File
      Not available unless: You belong to Registered Students
  • 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
      Not available unless: You belong to Registered Students
  • 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
      Not available unless: You belong to Registered Students
    • Biostat 214 Fall 2022 Final Project Assignment
      Not available unless: You belong to Registered Students
    • Biostat 214 2022-12-01 Screen Recording Media Resource
      Not available unless: You belong to Registered Students