This repo contains interactive learnr tutorials for the Masters of Science in Health Data Science courses Statistical Modelling II delivered by the Centre for Big Data Resaerch in Health, UNSW Sydney.
The learnr tutorial files can be found in the subfolder inst/tutorials
. Long file names caused errors so the tutorials are organised under shorter pseudonyms, detailed below.
Tutorial | Alias | Author |
---|---|---|
Research Design and Methods | rdx | Sanja |
DAGS | dags | Mark |
Propensity Score Matching | psm | Mark |
Time Series Analysis | tsa | Andrea |
Interrupted Time Series Analysis | its | Andrea |
Multilevel Modelling I | mlm1 | Mark |
Multilevel Modelling II | mlm2 | Mark |
Multilevel Modelling III | mlm3 | Mark |
Missing Data and Multiple Imputation | mi | Mark |
Presenting and summarising model results | pres | Shawon |
- Each tutorial has it's own
data
,images
andcss
subfolders containing any data/images/css code relevant to that tutorial. - The
rsconnect
subfolder contains files related to the deployment of tutorials online via shinyapps.io. Generally, we won't have to edit any files in these folders.
Below is a general workflow for updating tutorials.
- If not done already, clone the entire package repo to your local computer.
- If neccessary, use the Git tab to
pull
any remote updates to your local computer. - Make changes in the tutorial .rmd file.
- Run the .rmd file to make sure you are happy with your changes, and to update the corresponding .html file.
- Use Git to
add
andcommit
your changes. - When you are ready, use Git to
push
your changes to the remote repo.
- The package name is
hdat9700tutorials
- The functions
chapter1()
,chapter2()
etc launch the learnr tutorials in an interactive session. - The file
R/functions.R
contains code to map the learnr tutorials to the correct chapter number function. For example, the first block of code maps the tutorial research-design-and-methods (i.e. "rdx") to the functionchapter1()
. This makes it simple to re-order the chapters as required. - The file
R/zzz.R
contains a list of quotes, one of which is displayed at random on the screen when the package is loaded.
- The folder
inst/extdata
contains a second copy of the data files used across all tutorials. This allows students to access the data within R/RStudio without launching the learnr tutorial (provided they have the package installed). - For example, the following code could be used within R Studio to read the file
yrs2015.csv
:data <- read.csv(system.file("extdata", "yrs2015.csv", package="hdat9700tutorials"))