Skip to content

Repository for the R4ScHARR online Introduction to R course. If you are looking for the course material see link below:

Notifications You must be signed in to change notification settings

dark-peak-analytics/R4ScHARR

Repository files navigation

R4ScHARR - Introduction to R

GitHub release License: MIT GitHub last commit GitHub top language GitHub repo size GitHub forks

Repository for the R4ScHARR online Introduction to R Course.

Background

This 1 day short course is designed to provide the participant with a basic set of tools to undertake research using R. Rome wasn't built in a day, and R can't be taught in a day. The aim is to create a strong foundation on which participants can build skills and knowledge specific to their research objectives.

The course makes use of the authors' experiences of working with R for data-science and statistical analysis. However there are many other resources available, and we would particularly recommend the freely available content at R for Data Science as a good place to recap the materials taught in this course. The hard copy of Hadley Wickham and Garrett Grolemund's book of the same name (and content) is available at Amazon.com. Alternatively, a user guide is available on the CRAN R-Project website here, although the author finds this less easy to follow than Hadley Wickham's book described above. Further details of where to go to answer more specific questions are provided throughout the course.

Timetable

Time                     Leader Session Section
9:30-10:00 Rob Welcome & Introductions
10:00-10:25 Rob Why R? What is R?, Benefits of R, Benefits of R for decision modelling
10:25-11:10 Sarah 1 Syntax and basic operations - 45mins Navigating RStudio, Basic Operations, Objects, Evaluations
11:10-11:25 Break - time to move about and stretch your legs
11:25-12:00 Sarah 2 Objects classes and types - 45mins Object classes, Operations on different data structures, Sub setting data
12:00-12:45 Break - time to move about and stretch your legs
12:45-13:45 Sarah 3 Working with data in R - 45mins Setting working directories, Importing data, Summarizing data
13:45-14:00 Break - time to move about and stretch your legs
14:00-14:45 Rob 4 Data analysis - 45mins Plotting data, Linear regression, Downloading packages
14:45-15:00 Break - time to move about and stretch your legs
15:00-16:00 Rob 5 Learning more about R How to troubleshoot and where to find info, Where to go to learn more, What are the next steps, and what is possible, Observation: Case study analysis.
16:00-16:30 Rob Feedback and recap We are happy to remain on-line to answer specific questions.

Materials

We will work through the materials at a gradual pace to ensure that everyone can follow. The session will be informal and friendly and we welcome questions throughout. However if you want to see the content it can be found here:

Additional resources referenced in the course:

Forest Plot

Forest Plot Example

Shiny App

The following app is publicly available. The code can be found here. Please reference this paper if using the code.

R package

This example simpleR package may be useful.

Automated R Script Running

This example repo contains a workflow that uses GitHub Actions to run some R scripts at 6:15 every day.

Who are we?

Rob, Paul & Sarah work at the intersection between public health, economics and data-science. They are all based at Dark Peak Analytics and the School of Health and Related Research at the University of Sheffield. They were previously joint funded by the Wellcome Trust Doctoral Training Centre in Public Health Economics and Decision Science [108903] and the University of Sheffield.

Robert Smith is currently (2020) based at the UK Health Security Agency. He was previously based at ScHARR, University of Sheffield, and has been involved in multiple projects with the World Health Organization on topics ranging from physical activity to FGM. He is a big advocate of the use of R for Health Economics & Decision Science.

Paul Schneider joined ScHARR in 2018. He is working on conceptual and methodological problems in valuing health outcomes in economic evaluations. A medical doctor and epidemiologist by training, he has used R in various research projects, ranging from the modeling costs of breast cancer, and value of information analyses, to the monitoring of influenza in real-time using online data. He is a keen advocate of open science practices.

Sarah Bates joined ScHARR in 2016. She completed her PhD in Public health economic modelling in 2021 and has been a Research Associate in ScHARR since then. Sarah has a background in Health Psychology and Health economic modelling. She has used R for various projects with expertise in microsimulation modelling and is particularly interested in the challenges of modelling health behaviours and behaviour change.

Contact: rsmith@darkpeakanalytics.com

Website: Dark Peak Analytics