Skip to content

Repository files navigation

Introduction to R

Children’s Mercy Hospital


📆 February 28, 2025

⏰ 8 am - 5 pm

💻 Workshop Github


Setup

The workshop will be hosted in person at Children’s Mercy Hospital in Kansas City. Please come with R and RStudio already installed on your computer.

Slides

  • Introduction and R and Rmarkdown
  • Data Manipulation I and II
  • Visualization with ggplot
  • Statistical testing
  • Best practices

Code

Find our live coded notes in notes/ as we commit them.

Questions?

Feel free to ask questions in the GitHub Issues.

Overview

This is a 1 day workshop designed to introduce future users to R and Rstudio. We will cover data cleaning using the tidyverse, creating visuals with ggplot, basic statistical analysis and writing documents with Rmarkdown. In the end you should be able to:

  • import and manipulate data into different formats
  • create new variables and recode existing ones
  • plot data using the appropriate figure type
  • perform basic statistics
  • write Rmarkdown reports

Who is this course designed for?

Have you never written any code in R or any other programming language? Are you familiar with R, but hoping to bulk up your basic skills? Have you used R but are new to the tidyverse framework?

Learning objectives

Introduction to R/Rstudio and Rmarkdown

  • Get familiar with the R and Rstudio environment
  • Understand basic R code structure (packages, data structures)
  • Create and render Rmarkdown documents in multiple formats

Data import and manipulation - Part I

  • Import various data types
  • Explain the fundamentals of “tidy data” and the tidyverse
  • Clean data sets using dplyr verbs

Data manipulation and cleaning - Part II

  • Merge data sets
  • Transform data

Visualization

  • Understand the principles of ggplot2
  • Determine appropriate visualizations
  • Plot - geom_smooth to see a model over the data

Basic statistics

  • ttest, correlation and chisq
  • Model data
  • Report findings from R output

Materials/RStudio Cloud

Materials will be made available on GitHub. If you are using an organization-issued laptop, you may want to verify before you arrive that you can access GitHub.

Schedule

  • 08:00 - 08:15 - Welcome
  • 08:15 - 09:00 - Intro to R and Github
  • 09:00 - 10:00 - Data import and clean
  • 10:00 - 10:15 - Break
  • 10:15 - 11:30 - Data cleaning continued
  • 11:30 - 12:30 - Intro to ggplot2
  • 12:30 - 01:30 - Lunch
  • 01:30 - 02:30 - Statistical testing of means
  • 02:30 - 03:15 - Regression modeling
  • 03:15 - 03:30 - Break
  • 03:30 - 04:30 - Categorical data analysis
  • 04:30 - 05:00 - Rmarkdown (time allowing)

Instructors

This workshop is taught by Jordan Creed and Alex Soupir and sponsored by Brooke Fridley.

Additional resources


About

Code and slides associated with the Introduction to R workshop at CMH in Feb 2025.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages