StatsTFLValR

Lifecycle: Experimental License: MIT GitHub issues


Overview

StatsTFLValR is an R package providing reusable, audit-ready utilities for validation of clinical trial datasets and outputs.
It is designed to support dataset review, comparison, counting, and table-level verification commonly required in regulated statistical programming workflows.

The package emphasizes:

StatsTFLValR is intended for use by Statistical Programmers, Statisticians, and validation reviewers.


Key Features

Scope and Capabilities

🔹 Data Ingestion and Metadata Utilities


🔹 Frequency, Counts, and Summary Utilities


🔹 Table-Building Functions

Built-in ordering, indentation, and formatting logic is designed to support TFL validation and QC review.


🔹 Dataset and Output Comparison


🔹 Supporting Infrastructure


Function Index

The following functions are currently exported in StatsTFLValR:


Capability → Function Mapping

Capability Area Function(s) Typical Use Case
Dataset loading get_data() Load datasets for review and QC
Metadata inspection get_column_info() Variable-level dataset inspection
Frequency summaries freq_by(), freq_by_line() N (%) table validation
Descriptive statistics mean_by() Summary statistics QC
AE table validation SOCbyPT(), SOCbyPT_Grade() SOC–PT AE tables
Concomitant medication summaries ATCbyDrug() ATC-based summaries
Dataset comparison generate_compare_report() Developer vs validator comparison
Rounding consistency sas_round() SAS-aligned rounding

Installation

You can install the released version of StatsTFLValR from CRAN:

install.packages("StatsTFLValR")  

or 

install.packages("StatsTFLValR", dependencies = TRUE)

Install the development version from GitHub

# install.packages("remotes")
remotes::install_github("kalsem/StatsTFLValR")

Verify installation

library(StatsTFLValR)
packageVersion("StatsTFLValR")

Usage

Load the package:

library(StatsTFLValR)

Access function-level documentation:

?freq_by
?generate_compare_report

A PDF reference manual is available in the GitHub repository. 📄 Download StatsTFLValR PDF Manual ***

Package Status

Lifecycle: Experimental

Under active development

Interfaces and behavior may change in future releases

Bug reports and enhancement requests can be submitted via GitHub issues.


License

This package is licensed under the MIT License. See the LICENSE file for details.


Disclaimer

This package is provided as a supporting utility and does not replace formal validation or quality control processes.
Use of this package does not imply compliance with regulatory requirements. Users are responsible for ensuring appropriate validation, documentation, and governance in accordance with their internal procedures.