Introduction to the admiralonco R package
Introduction to admiralonco
admiralonco
is an extension of the admiral
package, designed specifically to handle oncology-specific data transformations in clinical trials. This package helps streamline the creation of CDISC ADaM datasets, ensuring compliance with regulatory standards.
In this tutorial, we will cover:
- The purpose and scope of
admiralonco
. - Installation instructions.
- Overview of dependencies and compatibility.
1. Purpose and Scope
The admiralonco
package provides functions tailored to the oncology domain, including:
- Handling tumor assessments (e.g., RECIST).
- Deriving progression-free survival (PFS) and overall survival (OS) endpoints.
- Managing longitudinal data from oncology studies.
By leveraging admiralonco
, users can generate ADaM datasets efficiently while ensuring consistency with industry best practices.
2. Installation Instructions
To install admiralonco
, first install the admiral
package if it is not already available:
# Install admiral from CRAN install.packages("admiral")
Next, install admiralonco
from GitHub:
# Install devtools if not already installed install.packages("devtools") # Install admiralonco from GitHub devtools::install_github("pharmaverse/admiralonco")
3. Overview of Dependencies and Compatibility
The admiralonco
package is designed to work within the pharmaverse
ecosystem. It has the following dependencies:
admiral
: Provides core ADaM dataset transformation functions.dplyr
: Used for data manipulation.tidyr
: Assists in data reshaping.lubridate
: Handles date-time conversions in clinical datasets.
To check whether all dependencies are installed, use:
# Check for missing dependencies required_packages <- c("admiral", "dplyr", "tidyr", "lubridate") missing_packages <- required_packages[!(required_packages %in% installed.packages()[, "Package"])] if(length(missing_packages)) install.packages(missing_packages)
After installation, you can load the package using:
# Load the admiralonco package library(admiralonco)
4. Example Usage
Let's load a sample oncology dataset and apply a function from admiralonco
:
# Load required libraries library(admiral) library(admiralonco) # Example vector of tumor responses responses <- c("SD", "PR", "CR", "PD", "NE") # Convert response categories to numeric values numeric_responses <- aval_resp(responses) # Display the results print(numeric_responses) [1] 3 2 1 5 6
By running this example, we transform categorical response values (Progressive Disease, Stable Disease, Partial Response, Complete Response, Not Evaluable) into numerical scores for easier statistical analysis.
Conclusion
The admiralonco
package is a powerful tool for managing oncology-specific ADaM datasets in R. By automating common transformations, it helps streamline clinical trial data processing and ensures compliance with CDISC standards.