Course Content
Data Entry, Validation, and Access Control
This chapter explores the operational aspects of data collection within REDCap, including data entry workflows, validation procedures, user rights management, audit trails, and quality assurance activities that help ensure research data remain reliable and compliant with regulatory standards.
0/12
Data Quality Management and Query Resolution
This topic is about ensuring that data is accurate, complete, and consistent. It covers identifying, investigating, and correcting errors or discrepancies in data. It also focuses on timely resolution of data queries to maintain data integrity and reliability.
0/13
Introduction to R for Clinical Data Management.
This topic introduces R, an open-source programming language used for statistical analysis, data management, and visualization. In clinical research, R is applied to clean, analyze, and report data in a reproducible and reliable manner.
0/1
Clinical Research Data Management Course

Clinical data management is increasingly dependent on the ability to move between data collection systems, statistical software, reporting tools, and documentation workflows. In many studies, the primary database may be implemented in REDCap, OpenClinica, Medidata Rave, Castor, or another electronic data capture system. However, data managers often need to perform tasks that go beyond the point-and-click interface of the database. They may need to compare exports, check data consistency across instruments, generate query lists, reconcile laboratory files, prepare monitoring reports, summarize missingness, inspect patterns across sites, or document a cleaning decision in a way that can be repeated later. R is valuable because it allows these tasks to be written as reusable scripts rather than performed manually each time (R Core Team, 2024; Wickham et al., 2023).
R is a programming language and environment for statistical computing, data manipulation, visualization, and reporting. In clinical research, it is often associated with statistical analysis, but its usefulness begins much earlier in the data lifecycle. A data manager does not need to become a statistician before R becomes useful. Even simple R scripts can make data management work more consistent. A script that imports a REDCap CSV export, checks for duplicate participant IDs, lists missing primary outcome values, and flags impossible dates can be rerun after every weekly export. The same logic can be reviewed by colleagues, version controlled and improved over time. This is very different from manually filtering spreadsheets, where the steps may be difficult to reconstruct and errors may remain hidden.
The central advantage of R in clinical data management is reproducibility. A reproducible process is one in which the same inputs and the same documented steps produce the same outputs. Reproducibility matters because clinical research data must be credible, traceable, and defensible. When a trial or observational study reaches interim review, statistical analysis, publication, or regulatory submission, the team must be able to explain how the data were handled. If a query report, cleaning log, or analysis dataset was produced through undocumented manual spreadsheet operations, it may be difficult to demonstrate exactly what was done. If the process was scripted in R, the logic is visible.
R also supports standardization. Data managers can create a set of standard checks that are applied across projects. For example, one script may check whether required fields are missing, whether date fields fall within plausible study periods, whether participant IDs are duplicated, and whether categorical variables contain values outside the data dictionary. These checks can be adapted for each study while preserving a common approach. Over time, an organization can develop a small library of standard R scripts for clinical data quality review.
Another important advantage is scalability. A spreadsheet may be convenient for a small dataset, but it becomes fragile when files grow large, when many variables are involved, or when repeated merges are needed. R can handle structured data in a way that is less dependent on manual scrolling, copying, and filtering. It is especially useful when data are received from multiple sources: REDCap exports, laboratory spreadsheets, pharmacy accountability logs, randomization lists, adverse event logs, and monitoring trackers. R allows the data manager to bring these sources together and perform checks across them.
R can also improve communication. A script can generate tables, figures, and reports for investigators, monitors, statisticians, and study coordinators. The same underlying data quality checks can be presented as a query listing for sites, a dashboard summary for investigators, and a documented cleaning report for the trial master file. When combined with R Markdown or Quarto, R can produce reports that include prose, code, tables, and output in one document.
Although this chapter focuses only on introductory R, the longer-term goal is to help learners see R as part of a transparent clinical data management workflow.
It is important, however, to use R responsibly. R does not replace the study protocol, data management plan, validation plan, audit trail, or human judgment. It is a tool that supports these structures. In a regulated or quality-assured environment, R scripts used for important data transformations or reporting should be documented, reviewed, and controlled. The data manager must understand what the script does, why it does it, and whether the output is fit for its intended purpose. The same principles of data integrity discussed in previous chapters apply here: data should be attributable, legible, contemporaneous, original or appropriately copied, accurate, complete, consistent, enduring, and available (Medicines and Healthcare products Regulatory Agency, 2018; Society for Clinical Data Management, 2024)