Learn R Programming

searchAnalyzeR (version 0.1.0)

ReproducibilityManager: Search Reproducibility Manager

Description

A comprehensive system for managing and validating the reproducibility of systematic review search strategies and analyses.

Arguments

Methods

new()

Initialize a new ReproducibilityManager instance

create_repro_package(search_strategy, results, analysis_config)

Create reproducible search package

validate_repro(package_path)

Validate reproducibility of existing package

gen_audit_trail(search_analysis)

Generate audit trail

Methods


Method new()

Creates a new ReproducibilityManager instance for managing search reproducibility. Sets up necessary configurations and validates system requirements.

Usage

ReproducibilityManager$new()

Returns

No return value, called for side effects (initialization) Create reproducible search package


Method create_repro_package()

Usage

ReproducibilityManager$create_repro_package(
  search_strategy,
  results,
  analysis_config
)

Arguments

search_strategy

Search strategy object

results

Search results

analysis_config

Analysis configuration

Returns

Path to reproducibility package Validate reproducibility of existing package


Method validate_repro()

Usage

ReproducibilityManager$validate_repro(package_path)

Arguments

package_path

Path to reproducibility package

Returns

Validation results Generate audit trail


Method gen_audit_trail()

Usage

ReproducibilityManager$gen_audit_trail(search_analysis)

Arguments

search_analysis

SearchAnalyzer object

Returns

Audit trail object


Method clone()

The objects of this class are cloneable with this method.

Usage

ReproducibilityManager$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

The ReproducibilityManager class provides tools for:

  • Creating reproducible search packages

  • Validating reproducibility of existing packages

  • Generating audit trails

  • Ensuring transparency and reproducibility in evidence synthesis

Examples

Run this code
# Create reproducibility manager
manager <- ReproducibilityManager$new()

# Create sample search strategy
search_strategy <- list(
  terms = c("systematic review", "meta-analysis"),
  databases = c("PubMed", "Embase"),
  timestamp = Sys.time(),
  date_range = as.Date(c("2020-01-01", "2023-12-31"))
)

# Create sample search results
search_results <- data.frame(
  id = paste0("article_", 1:20),
  title = paste("Research Study", 1:20),
  abstract = paste("Abstract for study", 1:20),
  source = "Journal of Research",
  date = Sys.Date() - sample(1:365, 20, replace = TRUE),
  stringsAsFactors = FALSE
)

# Create sample analysis configuration
analysis_config <- list(
  gold_standard = paste0("article_", sample(1:20, 5)),
  method = "precision_recall",
  parameters = list(threshold = 0.8)
)

# Create reproducible package (writes to tempdir())
package_path <- manager$create_repro_package(
  search_strategy = search_strategy,
  results = search_results,
  analysis_config = analysis_config
)

print(paste("Package created at:", package_path))

# Generate audit trail (create mock analyzer object for demonstration)
mock_analysis <- list(
  search_results = search_results,
  metadata = list(timestamp = Sys.time())
)
class(mock_analysis) <- "mock_analyzer"

audit_trail <- manager$gen_audit_trail(mock_analysis)
print("Audit trail generated successfully")

Run the code above in your browser using DataLab