Good practice for R users when working in the ONS SRS
25/11/2026
Categories: Events, Training opportunities, Office for National Statistics, ADR UK Partnership
25 November 2026
This practical online workshop will introduce good practice for writing efficient, reproducible and robust R code when working with large administrative datasets in the ONS Secure Research Service (SRS).
Working with large linked administrative datasets in a secure research environment creates practical and computational challenges that are not always encountered when using R on a local computer. Drawing on real-world experience of population-level linked education and health research in the ONS SRS, this session will explore approaches to designing, developing and checking R workflows.
Book your place now
The workshop will cover practical approaches to:
- defining the analytical unit before manipulating data
- reducing data before bringing it into R
- filtering, selecting and aggregating data to minimise unnecessary data movement and repeated computation
- working with datasets that may exceed available memory
- managing intermediate datasets and computational costs
- aggregating event-level data before joining
- understanding join relationships and avoiding common linkage risks
- distinguishing meaningful zeroes from missing information
- building validation and quality assurance into analytical workflows
- using modular code and reusable functions
- documenting code and designing workflows that are easier to rerun and maintain.
The session will focus on practical good practice rather than providing a comprehensive introduction to either R or the ONS SRS.
Approximately 40–45 minutes will comprise taught material, followed by 15–20 minutes of questions and facilitated discussion. Participants with previous experience of the SRS will also be encouraged to share alternative approaches and good practice.
Who should attend?
This workshop is aimed at ADR UK fellows and other researchers who are using, or preparing to use, R to analyse administrative data in the ONS Secure Research Service.
It may also be useful to researchers working in comparable trusted research environments.
Participants should have a basic working knowledge of R and data manipulation. No advanced programming knowledge is required. Familiarity with the ONS Secure Research Service is helpful but not essential.
No access to the ONS SRS or specialist software will be required during the session.
What you will learn
By the end of the session, participants will be able to:
- design an R analytical workflow that reflects the structure of linked administrative data
- apply practical approaches for reducing computational and memory demands when working with large datasets
- use appropriate strategies for filtering, selecting, aggregating and storing data
- recognise common risks in dataset linkage, aggregation and missing-data handling, and implement appropriate validation checks
- apply reproducible and maintainable coding practices, including modular code, reusable functions and documentation
- reflect on alternative approaches to solving practical coding challenges in secure research environments.
Event details
When: 14:00 - 15:00, 25 November
Where: Online
Cost: Free
Registration: Find out more and register on the Datacise Open Learning website.