Getting Started

The NHS-R community aims to support the learning, application and exploitation of R in the NHS.


The NHS-R community is welcoming and enthusiastic about R and if you are new to R you will find friendly support and encouragement. Please see below some ways to get started!

  1. Install R.
  2. Install RStudio.
  3. You might not have admin rights on your laptop. If you are unable to install R and RStudio, please contact your IT team.
  • Training

Please consider joining an ‘Introduction to R and RStudio’ workshop.

These are run every month (2nd Wednesday). Please see Events for further information and how to book.

A recording of this session is available on YouTube.

Further workshop information is available here:

Here you will find links to our webinars, conference talks and workshops – on a wide range of R related topics.

  • NHS-R Webinars

NHS-R host a monthly webinar covering a variety of topics, please see Webinars for a list of upcoming sessions. Webinars are recorded and are available to view via our YouTube Gallery.

Data sets

Like learning any language, practice is key. If you are looking for data to practice your R skills on, ONS or NHS Digital have several open data sets that provide a good starting point for getting to grips with data wrangling using the dplyr package and creating graphs with the ggplot2 package.
You might also want to check NHSRdatasets package. Funded and created by the NHS-R Community, this package brings together various healthcare data including HES-based synthetic dataset and ONS provisionally recorded weekly deaths.

Packages to start with

Starting coding in R might seem overwhelming – there are too many packages out there. Below is the list of the must-have packages for different needs:

  1. Working with the data:
    Wrangling data – Tidyverse (collection of R packages including dplyr)
    Working with dates – lubridate
  2. Data visualisations:
    To create a chart – ggplot2
    For interactive visualisations – plotly
    For animated charts – gganimate
    For stunning maps – leaflet
  3. Statistical Modelling:
    Pre-loaded package “base” has a number of statistical functions already, such as various statistical tests and linear regression modelling.
    For forecasting – forecast, astsa
    For clustering – cluster, pvclust
  4. Automated reports:
    To create automated reports in doc, pdf or html format – RMarkdown


Sharing your code might be beneficial for debugging as well as for helping other R users around the world. GitHub is a Git repository hosting service which was created to enable collaborative coding and sharing ofcode. You can find out more about GitHub here –

View the NHS-R Webinar by Zoë Turner who provides an overview of GitHub

NHS-R Github:


It might be tricky to remember all the functions in all the packages. Please have a look at variety of cheatsheets online –

Visit the website: “R for Data Science”. Hadley Wickham and Garrett Grolemund

This online book will teach you how to do data science with R

“Data science is an exciting discipline that allows you to turn raw data into understanding, insight, and knowledge. The goal of “R for Data Science” is to help you learn the most important tools in R that will allow you to do data science. After reading this book, you’ll have the tools to tackle a wide variety of data science challenges, using the best parts of R.”


  • Read how others have started with R, for tips and inspiration.
  • Further learning:
    From Forecasting to Funnel plots, the NHS-R community shares its experience and learning.

View NHS- R Blogs LINK

Still have questions? Join the NHS-R Community on Slack

For conversations about R and other data science/analysis tools and for help with queries and technical advice our Slack Channel is a great place for connecting with our active community who have a wealth of knowledge.

2021 NHS-R Community.