ctg_data_report {clintrialx}R Documentation

Generate a Comprehensive Clinical Trial Data Report

Description

This function creates a detailed, visually appealing HTML report from clinical trial data. It automates the process of data analysis and visualization, providing insights into various aspects of clinical trials such as study status, enrollment, duration, and funding sources.

Visit here for an example report - https://www.indraneelchakraborty.com/clintrialx/report.html.

Usage

ctg_data_report(
  ctg_data,
  title = "Clinical Trial Data Report",
  author = "Author Name",
  output_file = "./report.html",
  color_palette = c("#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b"),
  theme = "cerulean",
  include_data_quality = TRUE,
  include_interactive_plots = TRUE,
  custom_footer = NULL
)

Arguments

ctg_data

A data frame containing clinical trial data. Required columns include:

  • Study Status: Current status of each study (e.g., "Completed", "Ongoing")

  • Enrollment: Number of participants in each study

  • Start Date: The date each study began

  • Completion Date: The date each study ended or is expected to end

  • Phases: The phase of each clinical trial (e.g., "Phase 1", "Phase 2")

  • Funder Type: The type of organization funding each study

  • Study Type: The type of each study (e.g., "Interventional", "Observational")

title

Character string. The title of the report. Default is "Clinical Trial Data Report".

author

Character string. The name of the report author. Default is "Author Name".

output_file

Character string. The file path where the HTML report will be saved. Default is "./report.html". You can specify a different path if needed.

color_palette

Character vector. A set of colors to be used in the report's visualizations. Default is a preset palette of 6 colors. You can provide your own color codes for customization.

theme

Character string. The Bootstrap theme for the HTML report. Default is "cerulean". Other options include "default", "journal", "flatly", "readable", "spacelab", "united", "cosmo", "lumen", "paper", "sandstone", "simplex", and "yeti".

include_data_quality

Logical. Whether to include a data quality assessment section. Default is TRUE. Set to FALSE if you want to skip this section.

include_interactive_plots

Logical. Whether to generate interactive plots using plotly. Default is TRUE. Set to FALSE for static plots, which may be preferred for certain use cases.

custom_footer

Character string or NULL. A custom footer for the report. If NULL (default), a standard footer crediting the ClinTrialX package is used.

Details

The function performs these key steps:

1. Package Management:

2. Report Generation:

3. Data Visualization:

4. Optional Sections:

5. Report Finalization:

Value

This function doesn't return a value, but generates an HTML report at the specified location. It prints a message with the path to the generated report upon successful completion.

Tips for Users

See Also

https://www.indraneelchakraborty.com/clintrialx/ for more information about the ClinTrialX package.


[Package clintrialx version 0.1.0 Index]