R training session materials for NHSE Midlands System Improvement team
This repository will include four main file content types:
- R scripts used by the NHSE Midlands System Improvement team to create reports in Markdown and Shiny
- Repository of commmon adhoc functions created by the team to use on a daily basics
- Analytical products developed by the team such as R Markdown reports and Shiny apps
- R Team Learning materials
- The first session was about R and R Studio, an introduction to main menus and option in R Studio
- There are just two files produced for this first session: An Isoslides presentation and HTML file it generates
- The presentation slides can be run using R Studio
- It will open on any web browser
- This folder includes the whole set of materials to learn how to use loops
-
- R project that we will use to start and setup the session
-
- The R scripts used to produce the R markdown and also the R scripts
-
- The final PDF outputs as the report students will obtain at the end of this session.
- Reference files by using top level directory of a file project to build file paths
- Build robust project oriented workflows using HERE package
- Use project-relative paths
- Basic code design principles for real-life apps running on production environments
- The aim of this session is to create robust R scripts
- GGPLOT2 is an open-source data visualization package for the statistial programming language R
- It is an implementation of Lenand Wilkinson's Grammar of Graphics - a general scheme for data visualization
- It breaks up graphs into semantic components such as sclaes and layers
- Users tell ggplot2 how to map variables to asesthetics, what graphical primitives to use and the theme required for the plot
- We review the standard loops and functions structures in R combining them together
- Using them in tandem, we can produce automated PDF reports that can later on be sent out via email
- Dplyr is a grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges
- DPLYR is part of TIDYVERSE set of packages and combines very well with GGPLOT package that we reviewed in our previous session
-
Learn interactive web applications design principles in R
-
Design a shiny app components UI, SERVER
-
Create reactive elements between UI and SERVER components
-
Build your shiny app based on Inputs and Outputs
-
Learn how to clone a Github repo to download files to your local machine. To view file "01 Cloning a Github Repo from terminal.html" content, download and open it on your browser.
-
[Gallery] https://shiny.rstudio.com/gallery
-
[Shiny website] https://shiny.rstudio.com/
- Build Leaflet interactive maps into Shiny app
- Create function to download NHS indicators as zipped files from NHS websited (RTT,NHS111) using HTML tags
- Create static maps using GGPLOT2 package
- This example shows how to replace missing values in a data set
- The package allows you to arrange your data in a structured way making it easier to work
- You have a consistent way of referring to variables (as column names) and observations (as row indices)
- When use tidy data and tidy tools, you spend less time worrying about how to feed the output from one function into the input of another
- It allows you to spend more time answering your questions about the data