Promoting the use of R in the NHS

NHS-R Solutions

NHS-R Solutions

As part of NHS-R Community’s aim to support the learning, application and exploitation of R in the NHS, NHS-R provides funding to ‘Solutions’.

Solutions are R packages or training that have been proposed or identified, that will help the NHS to take advantage of the huge benefits of R.

Current Solutions

The following NHS-R Solutions are currently being developed, funded by NHS-R:


The NHS Data Dictionary is a package that does web scraping of a number of key NHS data dictionary lookups to have all the reference codes in one place.
NHSDataDictionaRy is  now available on CRAN:

Shiny Training

Introduction to Shiny courses for NHS and Public Sector – Please see here to book and for further information.

Shiny EndomineR (work in progress)

EndomineR is itself a highly useful piece of software for clinical use, the Shiny interface being developed would allow non coders to use it. Rolling out code based clinical solutions based on R to non technical audiences using tools like Shiny is a useful way for NHS-R to add value to the NHS.

FunnelPlotR (work in progress)

Funnel plots have various methods depending on the data type, and the process for statistical adjustments are complicated to the lay-user. 

FunnelPlotR will be a package with a standard interface, taking a data.frame input with a grouping variable, a numerator and a denominator, with various controls for the control limits, outlier detection and colour schemes making this process easier.   

Text Classification of NHS Patient Feedback  (work in progress)

There are thousands of patient feedback records that require labelling. Although some trusts read and code all their feedback, many do not. Consequently, areas where urgent action for making improvements is necessary may be missed or delayed. Trusts would benefit from an automated labelling process that would help them speed up the process of labelling and, consequently, the response speed to any issues the patients have raised. 

Nottinghamshire Healthcare NHS Foundation Trust has built a Text Classification model that is designed to predict the labels of unlabelled patient feedback. In order to make the Text Classification model available to the R community, as well as to better integrate the working of the models with the dashboard, this Solution will wrap the Python functions in R and release as a CRAN package.  

Expanding the phsmethods R Package (work in progress)

The phsmethods package has been developed to assist analysts in Public Health Scotland (PHS) with common analytical tasks. The benefits of this package are reducing duplication of effort where the same functions need to be written across multiple analyses and projects, reducing the likelihood of error, and a general streamlining of code and outputs in the organisation. This Solution will:

  • deepen the current function’s approaches and incorporate data requirements from other nation’s NHS systems
  • scope of the functions within the package could be widened
  • submit the package to CRAN


If you or your team are developing a package in R or a have a Solution you think NHS-R should consider please complete the proforma and send this to

If you have any questions about NHS-R Solutions or would like advice on submitting a proposal, please contact:

All NHS-R solutions are required to be released under an open source licence.
Please see this Blog for further information about Software licensing

All applications are considered by the NHS-R Technical Advisory Group and requestee will be informed as soon as an approval decision has been made.