Markdown notebooks illustrating the basics of R, RStudio and the tidyverse for medical research, epidemiology & related fields. Simulated health data.
Where to start: after installing R and RStudio, download these files (Click the green "Code" button, "Download ZIP"), unzip, and open intRo1 basics.Rmd
.
- The basics (Using RStudio; R Markdown notebooks and R scripts; assignment (
<-
); using functions and datasets) - Data visualisation (Using packages; making bar charts, Box plots and scatterplots with
ggplot2
) - Data summaries (Summarising continuous and categorical data; grouped summaries with
dplyr
, table 1 withgtsummary
) - Data subsets (Filtering rows and selecting columns with
dplyr
and base R) - Data transformation (Importing and exporting data; calculate new variables, categorise continuous variables, regroup a categorical variable)
- Data cleaning (Deleting and renaming variables; data classes; factors; labelling and recoding values)
- Data reshaping (Joining datasets; wide and long formats; reshaping wide to long and vice versa)
- Data analysis of continuous outcomes (data visualisation; t-test; linear regression)
- Data analysis of binary outcomes (work in progress)
Author: Andrea Mazzella